Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8: Update API paths and move read contract to contract/[contract_id]… #11

Merged
merged 1 commit into from
May 7, 2024

Conversation

mvandeberg
Copy link
Member

…/[method]

Resolves #8

Brief description

Checklist

  • I have built this pull request locally
  • I have ran the unit tests locally
  • I have manually tested this pull request
  • I have reviewed my pull request
  • I have added any relevant tests

Demonstration

❯ curl -X 'GET' \ 
  'http://localhost:3000/v1/contract/koin/balance_of?owner=1NsQbH5AhQXgtSNg1ejpFqTi2hmCWz1eQS' \
  -H 'accept: application/json' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    25    0    25    0     0    985      0 --:--:-- --:--:-- --:--:--  1000
{
  "value": "2391319670404"
}
❯ curl -X 'POST' \
  'http://localhost:3000/v1/contract/koin/balance_of' \                                         
  -H 'accept: application/json' \   
  -H 'Content-Type: application/json' \
  -d '{
  "owner": "1NsQbH5AhQXgtSNg1ejpFqTi2hmCWz1eQS"
}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    76    0    25  100    51    759   1550 --:--:-- --:--:-- --:--:--  2375
{
  "value": "2391319670404"
}

@mvandeberg mvandeberg requested a review from sgerbino May 6, 2024 20:13
@sgerbino sgerbino merged commit b282c0c into master May 7, 2024
@sgerbino sgerbino deleted the 8-read-contract branch May 7, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment