The URL of the API is http://connect.newhaze.com/api/. You HTTP-POST all the parameters you require to this location and the result is in either XML or JSON in the response.
| Required | Name | Type | Description |
| Required | method | string | A command to connect to a particular API (for example, games.get) |
| Required | consumer_key | string | Your site's consumer key |
| Required | v | number | Version number of API. Current version is 1.0 |
| Required | format | string | Either xml or json. Default json |
| Required | nonce | string | Unique ID for an API call. Must be greater than previous. We recommend using the PHP microtime(true) function |
| Required | timestamp | int | The time of the request. Number of seconds since 1st January 1970 00:00:00 |
| Required | sig | string | A signature generated using the request and the consumer_secret key. Learn more |
| Optional | access_token | string | The access token used to access data for a user |
| Optional | access_signature | string | The signature generated from the access_token_secret. Learn more |
auth.session Check your current access token, to see if the session is still valid.
auth.requestToken Get a request token for an authorization request.
auth.requestAccessToken Get an access token using an authorized request token.
categories.add Add a game category to the current site.
categories.get Get and filter game categories on the current site.
categories.rename Edit a game category on the current site.
categories.remove Remove a game category from the current site.
comments.add Add a comment to a game on the current site.
comments.get Get the comments for a game on the current site or from a user of the current site.
comments.remove Remove a comment made by the current user of the site.
favorites.add Add a game to the current user's favorites.
favorites.get Get a site user's favorite games.
favorites.remove Remove a game from the current user's favorites.
feed.addProfileComment Add a comment to a user's profile from the current user of the site.
feed.getHomeFeed Get a feed for the current user, showing friends' activity.
feed.getProfileFeed Get a feed of a user's activity.
feed.removePost Remove a post from the current user's feed.
friends.add The current site user can become friends with another user of the site.
friends.get Get the friends of the current user or a user of the site.
friends.remove Destroys a friendship between the current user and another user of the site.
games.add Add a game from the library to a category on the current site.
games.get Get and filter the games on the current site.
games.getLeaderboards Get all the leaderboards for a game on the current site.
games.getLibrary Get the full library of games from NewHaze (note: the games are not embeddable from this API call).
games.play Get the embed code to add the current game play to the user's account.
games.remove Removes a game from the current site.
games.setUrls Set the game URL for a game on the current site.
scores.get Get the scores for a game leaderboard.
sites.getInfo Get information about the current site.
sites.setInfo Set information for the current site.
store.getItems Get and filter the items in the store.
store.getPurchases Get the purchases of the developer who owns the current website.
store.purchaseItem Used to buy an item from the store on behalf of the current website's developer.
users.get Get and filter the current site users.
users.getPermissions Get the current permission settings for a site user.
users.setInfo Update the current site user's profile information.
© 2012 NewHaze Icons by Pixel Mixer Help