Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
439befb
commit 39c1115
Showing
10 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
############### | ||
# folder # | ||
############### | ||
/**/DROP/ | ||
/**/TEMP/ | ||
/**/packages/ | ||
/**/bin/ | ||
/**/obj/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
############### | ||
# temp file # | ||
############### | ||
*.yml | ||
.manifest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Introduction to `GameJoltDotNet` | ||
The [`GameJolt Game API`](https://gamejolt.com/game-api/doc) is a service provided by [GameJolt](https://gamejolt.com/), | ||
which provides you with a number of cloud based features for your game, including: | ||
* Online score tables | ||
* Trophies (achievements) | ||
* Cloud data storage | ||
* Game session logging | ||
* User verification | ||
|
||
In order to use these features, one has to communicate with the GameJolt servers through their RESTful web service. | ||
|
||
`GameJoltDotNet` is a `.NET` library which implements all of GameJolt's services and provides you with a clean and | ||
simple interface to communicate with the GameJolt servers. It is written in `C#` and fully documented by using `C#'s` | ||
xml documentations comments. | ||
|
||
## Install | ||
The easiest way to add this library to your project is by using NuGet. | ||
Just add the [`GameJoltDotNet`](https://www.nuget.org/packages/GameJoltDotNet/) NuGet package to your project and you're done. | ||
|
||
Alternatively you can also download the compiled dll from [github](https://github.com/InfectedBytes/GameJoltDotNet/releases) | ||
or [GameJolt](https://gamejolt.com/games/gamejoltdotnet/358157) and then add a reference to it in your project. | ||
|
||
## Supported .NET Frameworks | ||
For best portability this library is based on .NET Standard 1.3 and can therefore be used on a wide variety of different platforms. | ||
The following platforms are supported: | ||
|
||
Framework | Version | ||
----- | ----- | ||
.NET Standard | 1.3 | ||
.NET Core | 1.0 | ||
.NET Framework | 4.6 | ||
Mono | 4.6 | ||
Xamarin.iOS | 10.0 | ||
Xamarin.Mac | 3.0 | ||
Xamarin.Android | 7.0 | ||
Universal Windows Platform | 10.0 | ||
|
||
## Supported Languages | ||
Since this library is written in plain `C#`, the compiled DLL can be used by any `.NET` language, for example: | ||
* `C#` | ||
* `Visual Basic .NET` | ||
* `F#` | ||
* `Nemerle` | ||
* etc. | ||
|
||
Just add a reference to `GameJolt.dll` and you're ready to got. | ||
|
||
## Simple Example | ||
First of all you have to create a new api instance: | ||
```cs | ||
var api = new GameJoltApi(gameId, privateKey); | ||
``` | ||
Afterwards you can directly use the different GameJolt features. | ||
```cs | ||
// by using async/await: | ||
var response = await api.Scores.FetchAsync(); | ||
if(response.Success) { | ||
// response.Data contains the list of scores | ||
} | ||
|
||
// or by using the callback mechanism: | ||
api.Scores.Fetch(callback: response => { | ||
if(response.Success) { | ||
// response.Data contains the list of scores | ||
} | ||
}); | ||
``` | ||
|
||
Some APIs require an authenticated user, because they set or get data for a certain user. The authentication can be done like so: | ||
```cs | ||
var auth = await api.Users.AuthAsync(userName, userToken); | ||
if(auth.Success) { | ||
api.Trophies.SetAchieved(auth.Data, trophyId); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: Introduction | ||
href: intro.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"metadata": [ | ||
{ | ||
"src": [ | ||
{ | ||
"files": [ | ||
"GameJolt/**.csproj" | ||
], | ||
"src" : ".." | ||
} | ||
], | ||
"dest": "api", | ||
"disableGitFeatures": false, | ||
"disableDefaultFilter": false | ||
} | ||
], | ||
"build": { | ||
"content": [ | ||
{ | ||
"files": [ | ||
"api/**.yml" | ||
] | ||
}, | ||
{ | ||
"files": [ | ||
"articles/**.md", | ||
"articles/**/toc.yml", | ||
"toc.yml", | ||
"*.md" | ||
] | ||
} | ||
], | ||
"resource": [ | ||
{ | ||
"files": [ | ||
"images/**", | ||
"favicon.ico", | ||
"logo.png" | ||
] | ||
} | ||
], | ||
"overwrite": [ | ||
{ | ||
"files": [ | ||
"apidoc/**.md" | ||
], | ||
"exclude": [ | ||
"obj/**", | ||
"_site/**" | ||
] | ||
} | ||
], | ||
"dest": "../docs", | ||
"globalMetadata": { | ||
"_appFaviconPath" : "favicon.ico", | ||
"_appLogoPath": "logo.png" | ||
}, | ||
"globalMetadataFiles": [], | ||
"fileMetadataFiles": [], | ||
"template": [ | ||
"default" | ||
], | ||
"postProcessors": [], | ||
"markdownEngineName": "markdig", | ||
"noLangKeyword": false, | ||
"keepFileLink": false, | ||
"cleanupCacheHistory": false, | ||
"disableGitFeatures": false | ||
} | ||
} |
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
![GameJolt](images/gamejolt.png) | ||
|
||
# `GameJoltDotNet` | ||
GameJoltDotNet is a GameJolt [Game API](https://gamejolt.com/game-api/doc) client for the `.NET` Framework | ||
and can therefore be used by every `.NET` language, like `C#`, `VB.NET` or `F#`. | ||
|
||
For best portability this library is based on .NET Standard 1.3 and can therefore be used on a wide variety of different platforms. | ||
The following platforms are supported: | ||
|
||
Framework | Version | ||
----- | ----- | ||
.NET Standard | 1.3 | ||
.NET Core | 1.0 | ||
.NET Framework | 4.6 | ||
Mono | 4.6 | ||
Xamarin.iOS | 10.0 | ||
Xamarin.Mac | 3.0 | ||
Xamarin.Android | 7.0 | ||
Universal Windows Platform | 10.0 | ||
|
||
|
||
## GameJolt API Overview | ||
Service | Description | ||
----- | ----- | ||
Datastore | Manipulate items in a cloud-based data storage. | ||
Time | Get the server's time. | ||
Scores | Manipulate scores on score tables. | ||
Sessions | Set up sessions for your game. | ||
Trophies | Manage trophies for your game. | ||
Users | Access user-based features. | ||
Friends | List a user's friends. | ||
|
||
This library is heavily based on the async/await mechanism of C# and can therefore be used without blocking the main thread. | ||
Furthermore it provides a convenience facade API, which internally uses the async/await API, but provides a simple, callback based API as a front end. | ||
|
||
## Example | ||
First of all you have to create a new api instance: | ||
```cs | ||
var api = new GameJoltApi(gameId, privateKey); | ||
``` | ||
Afterwards you can directly use the different GameJolt features. | ||
```cs | ||
// by using async/await: | ||
var response = await api.Scores.FetchAsync(); | ||
if(response.Success) { | ||
// response.Data contains the list of scores | ||
} | ||
|
||
// or by using the callback mechanism: | ||
api.Scores.Fetch(callback: response => { | ||
if(response.Success) { | ||
// response.Data contains the list of scores | ||
} | ||
}); | ||
``` | ||
|
||
Some APIs require an authenticated user, because they set or get data for a certain user. The authentication can be done like so: | ||
```cs | ||
var auth = await api.Users.AuthAsync(userName, userToken); | ||
if(auth.Success) { | ||
api.Trophies.SetAchieved(auth.Data, trophyId); | ||
} | ||
``` |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Articles | ||
href: articles/ | ||
- name: Api Documentation | ||
href: api/ | ||
homepage: api/GameJolt.yml | ||
- name: Source 🔗 | ||
href: https://github.com/InfectedBytes/GameJoltDotNet |