Posts tagged with :hn:

@rishi1
Helloooo Hack Clubbers! It’s ya boi rice back at it again with another HN ship :hn: :parrot:! Before I lay out the new changes, I just wanted to thank the wonderful @caleb for testing out the bot authentication system yesterday (the UNO bot looks great), and @khushraj.rathod for volunteering to build out the exchange system—forex is coming to Hack Club, everyone :parrot_love:! Anyways, let’s get back to day 4 of my personal lil shipathon: changes to @undefined and the HN API! The Teller now has one awesome new command for validating payments (/pay was there before, but I’ve added some new messages and interactivity with it), and a super great new dashboard—feel free to head over to Home on @undefined’s profile page to take a look. The HN GraphQL API now supports advanced pagination and sorting! You can now query for as many transactions as you want, iterate through them, skip through tests, and even order by different fields! For instance, to grab the 5 people with the most HN and two of their largest payments, you can do something like:
query Users {
  users(options:{
    sort:{
      field:"balance",
      order:"DESC"
    },
    take:5
  }) {
    id
    balance
  	outgoingTransactions(options:{
      sort:{
        order:"DESC",
        field:"balance"
      },
      take:2
    }) {
      id
      balance
      from {
        id
      }
      to {
        id
      }
    }
  }
}
I’m soooooo excited for what all of yall are going to be doing with this—as always, if you’re interested in making a bot, feel free to DM me with the bot’s username to get your very own token! You can find the source for HN over at: :githubparrot: 🌟 z.rishi.cx/g/hn, and the Teller over at z.rishi.cx/g/teller :D P.S. The next ship will be V1 of HN—the production-ready, stable version of the API with documentation!
screen_shot_2020-12-25_at_3.14.50_pm.png