add game
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
parent
454de01881
commit
862a85e712
@ -1 +1 @@
|
||||
Subproject commit 03a64c3652bd60cc8cfab09bd70368a1c7dab9d8
|
||||
Subproject commit 1123a82bbcd10eaf6d4fd5d9c70484af6fa06a16
|
27
README.md
27
README.md
@ -108,7 +108,7 @@ $ docker compose build
|
||||
$ docker compose up -d
|
||||
```
|
||||
|
||||
## pds
|
||||
## pds:card
|
||||
|
||||
- https://atproto.com/ja/guides/lexicon
|
||||
- https://at.syu.is/at/did:plc:uqzpqmrjnptsxezjx4xuh2mn/ai.syui.card/3lagpwihqxi2v
|
||||
@ -116,4 +116,29 @@ $ docker compose up -d
|
||||
```sh
|
||||
# oauth(button)
|
||||
[yui]ai.syui.card.verify -> [user]ai.syui.card
|
||||
|
||||
[yui]
|
||||
$ ./target/debug/ai card-verify -i 0 -p 0 -r 0 -h syui.ai -d did:plc:uqzpqmrjnptsxezjx4xuh2mn
|
||||
{"uri":"at://did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.card.verify/3lagpvhppmd2q"}
|
||||
|
||||
[user]
|
||||
$ ./target/debug/ai card -i 0 -p 0 -r 0 -v at://did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.card.verify/3lagpvhppmd2q
|
||||
```
|
||||
|
||||
## pds:game
|
||||
|
||||
- https://atproto.com/ja/specs/record-key
|
||||
- https://at.syu.is/at/did:plc:uqzpqmrjnptsxezjx4xuh2mn/ai.syui.game/self
|
||||
|
||||
```sh
|
||||
# oauth(play)
|
||||
[yui]ai.syui.game.user -> [user]ai.syui.game
|
||||
|
||||
[account]
|
||||
# https://at.syu.is/at/did:plc:4hqjfn7m6n5hno3doamuhgef/ai.syui.game.user/syui
|
||||
## [rkey]
|
||||
1. echo $handle|cut -d . -f 1
|
||||
2. $handle
|
||||
3. tid
|
||||
```
|
||||
|
||||
|
27
at/lexicons/ai/syui/game.json
Normal file
27
at/lexicons/ai/syui/game.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "ai.syui.game",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"description": "Record containing a game.",
|
||||
"key": "literal:self",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["account", "createdAt"],
|
||||
"properties": {
|
||||
"account": {
|
||||
"type": "string",
|
||||
"format": "at-uri",
|
||||
"description": "at://verify..."
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "datetime",
|
||||
"description": "Client-declared timestamp when this post was originally created."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
97
at/lexicons/ai/syui/game/user.json
Normal file
97
at/lexicons/ai/syui/game/user.json
Normal file
@ -0,0 +1,97 @@
|
||||
{
|
||||
"lexicon": 1,
|
||||
"id": "ai.syui.game.user",
|
||||
"defs": {
|
||||
"main": {
|
||||
"type": "record",
|
||||
"key": "tid",
|
||||
"description": "Record containing a game user.",
|
||||
"input": {
|
||||
"encoding": "application/json",
|
||||
"record": {
|
||||
"type": "object",
|
||||
"required": ["did", "createdAt"],
|
||||
"properties": {
|
||||
"aiten":{
|
||||
"type": "integer",
|
||||
"default": 0
|
||||
},
|
||||
"did": {
|
||||
"type": "string"
|
||||
},
|
||||
"login": {
|
||||
"type": "bool"
|
||||
},
|
||||
"limit": {
|
||||
"type": "bool"
|
||||
},
|
||||
"charactor": {
|
||||
"type": "object",
|
||||
"enum": ["ai", "test"],
|
||||
"properties": {
|
||||
"ai":{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lv":{
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 7,
|
||||
"default": 1
|
||||
},
|
||||
"exp":{
|
||||
"type": "integer"
|
||||
},
|
||||
"rank":{
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 7,
|
||||
"default": 0
|
||||
},
|
||||
"mode":{
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 7,
|
||||
"default": 0
|
||||
},
|
||||
"hp":{
|
||||
"type": "integer",
|
||||
"maximum": 255,
|
||||
"default": 0
|
||||
},
|
||||
"attach":{
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 255,
|
||||
"default": 1
|
||||
},
|
||||
"critical":{
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 255,
|
||||
"default": 0
|
||||
},
|
||||
"critical_d":{
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 255,
|
||||
"default": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "datetime",
|
||||
"description": "Client-declared timestamp when this post was originally created."
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "datetime"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -578,6 +578,8 @@ async fn c_card_verify(c: &Context) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let rare = c.string_flag("rare").unwrap_or_else(|_| "normal".to_string());
|
||||
let user_handle = c.string_flag("handle").unwrap_or_else(|_| "syui.ai".to_string());
|
||||
let user_did = c.string_flag("did").unwrap_or_else(|_| "did:plc:uqzpqmrjnptsxezjx4xuh2mn".to_string());
|
||||
|
||||
//match id === 1 let img = "xxx";
|
||||
let str = post_card_verify::post_request(col, img, id, cp, rank, rare, user_handle, user_did);
|
||||
println!("{}", str.await);
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user