Git Product home page Git Product logo

spoon's Introduction

spoon's People

Contributors

brandongardner2 avatar birdcar avatar erin-koen avatar josenriagu avatar ticotheps avatar

Stargazers

Israel Gonzalez-Brooks avatar Ola avatar Tim Shaker avatar Vish Singh avatar Landry avatar  avatar Thomas Hessburg avatar Adam McKenney avatar Gannon Darcy avatar Kai Lovingfoss avatar  avatar Patrick Shushereba avatar Mike Landers avatar Jonathan Daly avatar Alex@YHY avatar  avatar  avatar  avatar Pete Murphy avatar Dan Sherman avatar

spoon's Issues

multiple pages more than 100 repos

one way to get more than the 100 repos is for pagination you could do something like,
var req = new XMLHttpRequest() req.open('GET', "https://api.github.com/users/{user}/repos?per_page=100:mozilla",false) req.send(null) var headers = req.getAllResponseHeaders().toLowerCase() var hlink = headers.slice(headers.indexOf("link"),headers.indexOf("x-github-media-type")) var last_page = hlink.slice(-16,-15)
to get the last page number then just got add a page number to the fetchRepos() api call, till it reaches the last_page so you get all repos instead of just 100
just a rough slice approach and theres probably better way but that should work

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.