corpetty / go-alethio-api Goto Github PK
View Code? Open in Web Editor NEWAlethio API client written in golang
Alethio API client written in golang
there are only two types of meta objects currently (with and without pagination) so it would make sense to have them as separate structs and embed them into the top level structs
Meta:
type: object
description:
en: Meta information about the request.
zh: (...)
properties:
latestBlock:
type: object
description:
en: Information about the latest block in the canonical chain.
zh: (...)
properties:
number:
description:
en: The block number of the latest block.
zh: (...)
example: 7909779
type: integer
blockCreationTime:
description:
en: The inception timestamp (UTC) of the latest block.
zh: (...)
example: 1559879572
format: unixtime
type: integer
blockHash:
description:
en: The hash of the latest block.
zh: (...)
example: '0x8f25ead8680577256d43d5401beeb9cefa4cc121478c79c75a2e23a4695aa450'
format: hex256
type: string
MetaPagination:
type: object
description: Meta information about the request.
properties:
latestBlock:
type: object
description: Information about the latest block in the canonical chain.
properties:
number:
description:
en: The block number of the latest block.
zh: (...)
example: 7909779
type: integer
blockCreationTime:
description:
en: The inception timestamp (UTC) of the latest block.
zh: (...)
example: 1559879572
format: unixtime
type: integer
blockHash:
description:
en: The hash of the latest block.
zh: (...)
example: '0x8f25ead8680577256d43d5401beeb9cefa4cc121478c79c75a2e23a4695aa450'
format: hex256
type: string
count:
type: integer
description:
en: The number of items included in the current page.
zh: (...)
example: 10
page:
type: object
description:
en: Pagination flags.
zh: (...)
properties:
hasNext:
description:
en: Flags `true` if the `next` page has at least one entry, `false` otherwise
zh: (...)
example: true
type: boolean
hasPrev:
description:
en: Flags `true` if the `prev` page has at least one entry, `false` otherwise
zh: (...)
example: true
type: boolean
for ease of use in go
filters are not currently implemented.
e.g. "filter by sender" for any endpoint.
this really really needs to return errors instead of an empty struct, when errors are returned from the API.
currently all api requests are set to the default 10 result items.
we should be able to set this on a per client basis and overwrite per call if needed.
would like to fuzz the client with go-fuzz
to test its inputs for failures.
We need tests for each API endpoint. Thoughts on frameworks on this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.