Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsm412 committed Jul 8, 2024
1 parent 9710e79 commit 7746a13
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 49 deletions.
2 changes: 1 addition & 1 deletion rair-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ The benefits of using the Dockerfile are that it uses the latest OFAC list.
* [x] /network/:networkId/:contract/:product
* [x] / - GET - Get the tokens in product ([details](readme/current/nft/nft_manual_product.md))
* [x] /attributes - GET - Get all attributes from the NFTs in a product ([details](readme/current/nft/nft_manual_attributes.md))
* [x] /numbers - GET - Get all tokens numbers in the product ([details](readme/current/nft/nft_manual_numbers.md))
* [x] /files - GET - Get all files associated with the product ([details](readme/current/nft/nft_manual_files.md))
* [x] /files/:token - GET - Get all files associated with a token in the product ([details](readme/current/nft/nft_manual_files_token.md))
* [x] /offers - GET - Get the product data and the offers associated ([details](readme/current/nft/nft_manual_offers.md))
Expand Down Expand Up @@ -180,7 +181,6 @@ The benefits of using the Dockerfile are that it uses the latest OFAC list.
* [x] /tokens
* [x] / - GET - Search tokens ([details](readme/current/tokens/tokens_list.md))
* [x] /id/:id - GET - Get data for a specific token ([details](readme/current/tokens/tokens_single.md))
* [x] /tokenNumbers - GET - Get all tokens on a specific contract and offer ([details](readme/current/tokens/tokens_numbers.md))
* [x] /:token - GET - Get information for a single token ([details](readme/current/tokens/tokens_single_number.md))
* [x] /transaction/:network/:hash - POST - Process a blockchain transaction ([details](readme/current/transactions/transaction_hash.md))
* [x] /users
Expand Down
1 change: 1 addition & 0 deletions rair-node/bin/api/nft/nft.Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ module.exports = {
},
]).collation({ locale: 'en_US', numericOrdering: true });
return res.json({
success: true,
tokens: offerData.reduce((total, offer) => total.concat(offer.tokens), []),
});
} catch (err) {
Expand Down
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,9 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,9 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_files_token.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,9 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_locks.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,11 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```
**Condition** : There are no offers with locked tokens
**Code** : `404 NOT FOUND`
Expand Down
49 changes: 49 additions & 0 deletions rair-node/readme/current/nft/nft_manual_numbers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Get the files associated to a product
Search using network and address

**URL** : `/api/nft/network/:network/:contractAddress/:product/files`
**Method** : `GET`

**Parameters**
```json
{
"network": { "required": true, "content": { "type": "string" } },
"contractAddress": { "required": true, "content": { "type": "string" } },
"product": { "required": true, "content": { "type": "string" } },
}
```

## Success Response
**Code** : `200 OK`
**Content-Type**: `application/json`
**Content example**
```json
{
"success": true,
"tokens": [
{
"token": "0",
"sold": true
},
{
"token": "1",
"sold": true
},
{
"token": "2",
"sold": true
},
{
"token": "3",
"sold": true
}
]
}
```

**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Data not found" }
```
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_offers.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,9 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```
10 changes: 2 additions & 8 deletions rair-node/readme/current/nft/nft_manual_product.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,9 @@ Search using network and address
}
```

**Condition** : Contract not found
**Condition** : Contract or Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Contract not found" }
```
**Condition** : Product not found
**Code** : `404 NOT FOUND`
**Content** :
```json
{ "success": false, "error": true, "message": "Product not found" }
{ "success": false, "error": true, "message": "Data not found" }
```

0 comments on commit 7746a13

Please sign in to comment.