Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Turupawn committed Jun 18, 2019
1 parent 9f8fcf7 commit 4dfcbd6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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");
Expand All @@ -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");
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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"

// ...
Expand Down

0 comments on commit 4dfcbd6

Please sign in to comment.