Introduction

On the site management page, you may see a section which invites you to add URLs to your site. What does this do? It basically means that if you use any of our JavaScript codes, such as advertising or ratings and comments, or you use the NewHaze users system, then NewHaze is able to work better with your site in order to provide the best user experience. Also, if you have a backend which deals with adding and removing games and categories, NewHaze can connect your games with our games much more easily.

Details

URL Name Summary Additional GET Parameters
Add Game PingNewHaze will ping this URL with the game ID when you add a new game.
Add Category PingNewHaze will ping this URL with the category ID when you add a new category.
User URL MaskWhen NewHaze links to a user's profile, it will use this URL.{uid} - user ID
Game URL MaskWhen NewHaze links to a game, it will use this URL.{gid} - game ID, {slug} - game slug
Remove Category PingNewHaze will ping this URL with the category ID when you remove a category.
Remove Game PingNewHaze will ping this URL with the game ID when you remove a game.

Add Category Ping

This URL will be pinged with the category ID sent via HTTP POST. You can then load the category name using categories.get. Once again, the HTTP User Agent would be NewHaze. You may wish to see for an example implementation.

User URL Mask

In some cases, such as the ratings and comments widget, NewHaze needs to link to a user's profile page. If you don't specify a user URL mask then we link to the user's profile on NewHaze (eg. http://www.newhaze.com/profile.php?id=1), however if you specify a URL mask then we can link to their profile on your site. You can use variables when writing the mask URLs. For User URL mask, the only variable currently available is {uid} which will show the user's ID number on your website. You can use it anywhere in the URL and it will be replaced when used.

URL Entry Returned Value Example
{uid} The user ID of the profile to return 1, 504

Game URL Mask

When we link to the game on your site, like above, it is useful for us to know the location to provide the best playing experience. If you don't specify a game URL mask then we link to the game on NewHaze (eg. http://www.newhaze.com/content.php?id=1), however if you specify a URL mask then we can link to the game on your site. The variables you can use in the game URL mask are {gid} which provides the game ID on your site and {slug} which will return the GameSlug.

URL Entry Returned Value Example
{gid} The game ID of the game to return 35, 2049
{slug} The slug of the game to return game-name, it-s-just-a-game
You can, alternatively, set the game URL for each game individually. If a game has a URL set for it, then it overrides a game URL mask.

Remove Category Ping

This URL is pinged when you remove a game category from your site. You may want to use categories.get to confirm that the category no longer exists. The category ID is posted in this request as cid. Also, the User Agent for this is NewHaze. You may wish to see for an example implementation.

Remove Game Ping

This URL is pinged when you remove a game from your site. You may want to use games.get to confirm that the game no longer exists. The game ID is posted in this request as gid. Also, the User Agent for this is NewHaze. You may wish to see for an example implementation.


© 2012 NewHaze   Icons by Pixel Mixer   Help