Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/connor4312/spacegdn-bridge
Node.js bridge for the SpaceGDN
https://github.com/connor4312/spacegdn-bridge
Last synced: about 1 month ago
JSON representation
Node.js bridge for the SpaceGDN
- Host: GitHub
- URL: https://github.com/connor4312/spacegdn-bridge
- Owner: connor4312
- Created: 2014-08-07T23:30:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-08T19:53:31.000Z (over 10 years ago)
- Last Synced: 2024-10-25T22:15:00.504Z (about 2 months ago)
- Language: TypeScript
- Size: 135 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
#SpaceGDN Bridge
This is basically a direct port of the PHP [spacegdn-bridge](https://github.com/MCProHosting/spacegdn-bridge/) and my attempt to learn and play around with Typescript.
Usage Examples:
```js
var Bridge = require('spacegdn-bridge');
var bridge = new Bridge();// Sets the location of the GDN
bridge.setEndpoint('gdn.api.xereo.net');// Gets all jars:
bridge.get('jars').results(function (err, data) {
// do something amazing
});// Gets the second page of jars:
bridge
.get('jars')
.page(2)
.results(function (err, data) {
// do something amazing
});// Gets all versions owned by jar #2:
bridge
.jar(2)
.get('versions')
.results(function (err, data) {
// do something amazing
});// Query demonstrating most GDN properties.
bridge
.jar(2)
.get('builds')
.where('build', '>', 1234)
.orderBy('build', 'desc')
.results(function (err, data) {
// do something amazing
});// "data" is simply the JSON object returned by the GDN.
```