
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
githubapi.js
Advanced tools
githubapi.js allow to access github api in javascript. It can be used from node.js or browser. The library code is available at /build/githubAPI.js There is a fully documented API also available at the end of this README.md.
To install for node.js, just do
npm install githubapi.js
To install for browser, just do
bower install githubapi.js
or just include build/githubAPI.js in your projects the way you see fit :)
Let's see how to use githubapi.js. There are examples for you to look at and see how to use it. The examples shows usage from the browser and from node.js. You can find them in /examples/express/public.
Now, let's run the server. A server is required because github api requires authentications for many calls.
An authentication server is provided as examples in /examples/express,
coded with express as you may have guessed.
It run the authentication server and serve /examples/express/public as static.
First you need to authenticate yourself on github. It will give permissions to example application.
You need to create register your application on github. At the moment, it is in user -> setting -> applications -> register new application. link

Get the clientID and clientSecret you see on top.
Then setup those value into your examples server. First, copy examples/expess/app_github_keys.sample.js into examples/expess/app_github_keys.js
Then replace the values by your own clientID/clientSecret.
And you are done.
Once you got the keys setup, launch the server this way and go to http://127.0.0.1:8000/ with your browser
cd examples/express
make server
make build - build the librarymake minify - build the library and minify itmake server - launch dev servermake jsdoc - generate docs/api.md from jsdoc in /srcThis library is working well in my experience, They are other wrapper for github api, i dont claim mine is better :) The other libraries seemed good when i looked. be sure to check them out.
I had to implement my own github api wrapper. It was a core part of a project. So i had to really understand it, i could not rely on a 3rd party library. This is why i reimplemented it.
/build - the built source, the one you need as a user of the library/src - the source of the library itself, where you go to develop this api/examples - the examples you can run to learn how to use this library
/examples/express - the express server needed to run the examplesHere is the api documentation. It is complete and automatically generated from jsdoc to be sure to stay in sync. It has been pasted from the original.
##new Github(accessToken, profile) Build the tool itself
Params
String - the access token you got from authenticationObject - the profile of your user from github##Github.userBlackList user blacklist
Type: Array.<String>
##Github.Flow()
Build a flow to handle asynchronous data flow
gowiththeflow.js - https://github.com/jeromeetienne/gowiththeflow.js
##github.getRepos(onLoad) get all repositories
Params
function - callback called on load##github.createRepo() https://developer.github.com/v3/repos/#create
##github.deleteRepo() https://developer.github.com/v3/repos/#delete-a-repository
##github.createOrUpdateFile() https://developer.github.com/v3/repos/contents/#update-a-file
##github.filesList(repoName, rootPath, onLoad) get a list of all the file at rootPath
Params
String - the name of the repositoryString - the root path where to start, likely '' for the whole thingfunction - callback called once data are loaded##github.get(path, onLoad) get data
Params
String - the api pathfunction - callback called when the result is loaded##github.post(path, onLoad) post data
Params
String - the api pathfunction - callback called when the result is loaded##github.put(path, onLoad) put data
Params
String - the api pathfunction - callback called when the result is loaded##github.delete(path, onLoad) delete data
Params
String - the api pathfunction - callback called when the result is loaded##github._requestRead(method, path, onLoad) Perform a READ on github API
Params
String - "POST" "PUT" "DELETE" this kindof thingString - the api pathfunction - callback called when the result is loaded##github._requestWrite(method, path, dataToPost, onLoad) Perform a WRITE on github API
Params
String - "POST" "PUT" "DELETE" this kindof thingString - the api pathObject | String - the data to send alongfunction - callback notified when the result is loaded##github.getContent(repoName, path, onLoad) get contents - https://developer.github.com/v3/repos/contents/#get-contents
Params
String - the repository nameString - the path to the contentfunction - callback called on load##github.getContent(repoName, path, onLoad) get contents - https://developer.github.com/v3/repos/contents/#get-contents
Params
String - the repository nameString - the path to the contentfunction - callback called on load##github.getReadme(repoName, onLoad) get README - https://developer.github.com/v3/repos/contents/#get-the-readme
Params
String - the repository namefunction - callback called on load##github.createFile(repoName, path, message, content, onLoad) https://developer.github.com/v3/repos/contents/#create-a-file
Params
type - [description]type - [description]type - [description]type - [description]type - [description]Returns: type - [description]
##github.updateFile()
https://developer.github.com/v3/repos/contents/#update-a-file
##github.deleteFile() https://developer.github.com/v3/repos/contents/#delete-a-file
##github.createFork() https://developer.github.com/v3/repos/forks/#create-a-fork
##github.checkUserBlacklist(userName) test if the username is in the user blacklist
Params
String - the usernameFAQs
wrapper on top of github api v3
We found that githubapi.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.