Skip to content
Snippets Groups Projects
Commit aa4ddc26 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[enh] Add README

parent f97b4324
No related branches found
No related tags found
No related merge requests found
# Setup
## Prérequis
* NodeJS 9
## Installation
### Dépendances
yarn
### Synchronisation Ğ1
node index.js sync g1.duniter.org
## Usage
node index.js gva
L'IHM est alors consultable à l'adresse http://localhost:15000/graphql
## Exemples de requêtes
### hello
```json
{
hello
}
```
```json
{
"data": {
"hello": "Welcome to Duniter GVA API."
}
}
```
### block(number)
```json
{
block(number: 0) {
number
currency
membersCount
}
}
```
```json
{
"data": {
"block": {
"number": 0,
"currency": "g1",
"membersCount": 59
}
}
}
```
## API
Dans GraphQLi, dans le menu en haut à droite "Docs > Query" se situe la liste des opérations possibles actuelles.
```
hello: String
currency: String!
block(number: Int): Block
member(uid: Stringpub: String): Identity
pendingIdentities(search: String): [PendingIdentity!]!
pendingIdentityByHash(hash: String!): PendingIdentity
pendingTransactions: [Transaction!]!
transactionByHash(hash: String!): Transaction
transactionsOfIssuer(issuer: String!): [Transaction!]!
transactionsOfReceiver(receiver: String!): [Transaction!]!
sourcesOfPubkey(pub: String!): [Source!]!
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment