Giter Club home page Giter Club logo

go-alethio-api's People

Contributors

corpetty avatar tzapu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tzapu

go-alethio-api's Issues

add a meta struct (or two)

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

fuzz client

would like to fuzz the client with go-fuzz to test its inputs for failures.

api errors

this really really needs to return errors instead of an empty struct, when errors are returned from the API.

implement filters

filters are not currently implemented.

e.g. "filter by sender" for any endpoint.

no tests

We need tests for each API endpoint. Thoughts on frameworks on this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.