Skip to content
Permalink
Browse files

Update README.md

  • Loading branch information...
Turupawn committed Jun 18, 2019
1 parent 9f8fcf7 commit 4dfcbd67751a707366b5258b70094daa9c156931
Showing with 13 additions and 13 deletions.
  1. +13 −13 README.md
@@ -29,7 +29,7 @@ Welcome to the [mod.io SDK](https://apps.mod.io/sdk) repository, built using C a

### Browse mods

```
```c++
modio::FilterCreator filter_creator;
filter_creator.setLimit(5); // limit the number of results
filter_creator.setOffset(0); // paginate through the results by using a limit and offset together
@@ -50,7 +50,7 @@ Authentication enables automatic installs and updates under the hood.

First step is to request a security code to your email.

```
```c++
modio_instance.emailRequest("example@mail.com", [&](const modio::Response& response)
{
if (response.code == 200)
@@ -62,7 +62,7 @@ modio_instance.emailRequest("example@mail.com", [&](const modio::Response& respo

Finish authentication by submitting the 5-digit code.

```
```c++
modio_instance.emailExchange("50AD4", [&](const modio::Response& response)
{
if (response.code == 200)
@@ -78,7 +78,7 @@ If your game is running inside a popular distribution platform such as Steam or

#### Galaxy Auth

```
```c++
modio_instance.galaxyAuth(appdata, [&](const modio::Response &response)
{
if (response.code == 200)
@@ -90,7 +90,7 @@ modio_instance.galaxyAuth(appdata, [&](const modio::Response &response)

#### Steam Auth

```
```c++
modio_instance.steamAuth(rgubTicket, cubTicket, [&](const modio::Response &response)
{
if (response.code == 200)
@@ -106,7 +106,7 @@ Download mods automatically by subscribing, uninstall them by unsubscribing.

#### Subscribe

```
```c++
modio_instance.subscribeToMod(mod_id, [&](const modio::Response& response, const modio::Mod& mod)
{
if(response.code == 201)
@@ -118,7 +118,7 @@ modio_instance.subscribeToMod(mod_id, [&](const modio::Response& response, const

#### Unsubscribe

```
```c++
modio_instance.unsubscribeFromMod(mod_id, [&](const modio::Response& response)
{
if(response.code == 204)
@@ -130,7 +130,7 @@ modio_instance.unsubscribeFromMod(mod_id, [&](const modio::Response& response)

### Mod ratings

```
```c++
modio_instance.addModRating(mod_id, 1 /*or -1 for negative rating*/, [&](const modio::Response& response)
{
if(response.code == 201)
@@ -146,7 +146,7 @@ Share mods by creating a mod profile and attaching modfiles to it.

#### Create a mod profile

```
```c++
modio::ModCreator mod_creator;
mod_creator.setName("Graphics Overhaul Mod");
mod_creator.setLogoPath("path/to/image.jpg");
@@ -166,7 +166,7 @@ modio_instance.addMod(mod_creator, [&](const modio::Response& response, const mo

#### Upload a modfile

```
```c++
modio::ModfileCreator modfile_creator;
modfile_creator.setModfilePath("path/to/mod_folder/");
modfile_creator.setModfileVersion("v1.1.0");
@@ -179,7 +179,7 @@ modio_instance.addModfile(requested_mod.id, modfile_creator);

#### Download listener

```
```c++
modio_instance.setDownloadListener([&](u32 response_code, u32 mod_id) {
if (response_code == 200)
{
@@ -190,7 +190,7 @@ modio_instance.setDownloadListener([&](u32 response_code, u32 mod_id) {

#### Upload listener

```
```c++
modio_instance.setUploadListener([&](u32 response_code, u32 mod_id) {
if (response_code == 201)
{
@@ -208,7 +208,7 @@ Visit the [wiki](https://github.com/modio/SDK/wiki) to learn how to integrate de
If you are a game developer, first step is to add mod support to your game. Once mod support is up and running, [create your games profile](https://mod.io/games/add) on mod.io, to get an API key and access to all [functionality mod.io offers](https://apps.mod.io/guides/getting-started).
Next, download the latest [SDK release](https://github.com/modio/SDK/releases) and unpack it into your project, then head over to the [GitHub Wiki](https://github.com/modio/SDK/wiki/Getting-Started) and follow the guides corresponding to your setup.

```
```c++
#include "modio.h"
// ...

0 comments on commit 4dfcbd6

Please sign in to comment.
You can’t perform that action at this time.