Update README.md

This commit is contained in:
Shivam Pandey 2021-06-24 11:57:11 +05:30 committed by GitHub
parent d38f38fd5f
commit 7003eba17a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

168
README.md
View File

@ -242,6 +242,22 @@ Output:
"token": "rmt" "token": "rmt"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rmt&floAddress=F6WPx2WFdmVQ6AMutZ2FJzpyiwdxqLyd2z')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rmt&floAddress=F6WPx2WFdmVQ6AMutZ2FJzpyiwdxqLyd2z'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Information about a FLO address's transactions ### Information about a FLO address's transactions
Get information about a FLO address's transactions Get information about a FLO address's transactions
@ -277,7 +293,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressTransactions?floAddress=F6WPx2WFdmVQ6AMutZ2FJzpyiwdxqLyd2z')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressTransactions?floAddress=F6WPx2WFdmVQ6AMutZ2FJzpyiwdxqLyd2z'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Get list of all active smart contracts ### Get list of all active smart contracts
Get list of all active smart contracts Get list of all active smart contracts
``` ```
@ -303,7 +334,22 @@ Output:
] ]
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractList')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractList'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Smart Contract's information ### Smart Contract's information
Get information about a specified Smart Contract Get information about a specified Smart Contract
``` ```
@ -333,7 +379,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractInfo?contractName=india-elections-2019&contractAddress=F7osBpjDDV1mSSnMNrLudEQQ3cwDJ2dPR1')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractInfo?contractName=india-elections-2019&contractAddress=F7osBpjDDV1mSSnMNrLudEQQ3cwDJ2dPR1'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Smart Contract's participants ### Smart Contract's participants
Get information about a specified Smart Contract's participants Get information about a specified Smart Contract's participants
``` ```
@ -368,7 +429,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractParticipants?contractName=india-elections-2019&contractAddress=F7osBpjDDV1mSSnMNrLudEQQ3cwDJ2dPR1')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractParticipants?contractName=india-elections-2019&contractAddress=F7osBpjDDV1mSSnMNrLudEQQ3cwDJ2dPR1'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Smart Contract's participant details ### Smart Contract's participant details
Get information about a specified Smart Contract's participants Get information about a specified Smart Contract's participants
``` ```
@ -403,7 +479,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractParticipantDetails?floAddress=')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getSmartContractParticipantDetails?floAddress='){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Block details ### Block details
Get information about a block by specifying its blockno Get information about a block by specifying its blockno
``` ```
@ -433,7 +524,22 @@ Output:
"version": 1 "version": 1
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getBlockDetails/<blockno>')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getBlockDetails/<blockno>'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Transaction details ### Transaction details
Get information about a transaction Get information about a transaction
``` ```
@ -537,7 +643,22 @@ Output:
} }
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/<transactionHash>')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/<transactionHash>'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Latest Blocks details ### Latest Blocks details
Get information about latest blocks Get information about latest blocks
``` ```
@ -655,7 +776,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getLatestBlockDetails')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getLatestBlockDetails'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Latest Transactions details ### Latest Transactions details
Get information about latest transactions Get information about latest transactions
``` ```
@ -808,6 +944,22 @@ Output:
"result": "ok" "result": "ok"
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getLatestTransactionDetails')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getLatestTransactionDetails'){
.then(response => response.json())
.then(data => console.log(data));
}
```
### Latest Block Transactions ### Latest Block Transactions
Get information about block transactions Get information about block transactions
``` ```
@ -898,3 +1050,19 @@ Output:
} }
``` ```
Python example code
```
response = requests.get('https://ranchimallflo.duckdns.org/api/v1.0/getBlockTransactions/<blockdetail>')
if response.status_code == 200:
json_response = response.json()
elif response.status_code == 404:
print('Not Found.')
```
Javascript example code
```
fetch('https://ranchimallflo.duckdns.org/api/v1.0/getBlockTransactions/<blockdetail>'){
.then(response => response.json())
.then(data => console.log(data));
}
```