From 46e765b5e05eac664ca069e86acbe651c39e2235 Mon Sep 17 00:00:00 2001 From: intenscia Date: Sun, 23 Jun 2024 16:58:57 +1000 Subject: [PATCH] Updated docs --- source/index.html.md | 218 +++++++++++++++++++++---------------------- 1 file changed, 109 insertions(+), 109 deletions(-) diff --git a/source/index.html.md b/source/index.html.md index 8eeb46b..560a027 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -13423,115 +13423,6 @@ To perform this request, you must be authenticated via one of the following meth # Me -## Ping - -> Example request - -```shell -# You can also use wget -curl -X GET https://*.modapi.io/v1/ping \ - -H 'Accept: application/json' - -``` - -```http -GET https://*.modapi.io/v1/ping HTTP/1.1 -Host: *.modapi.io - -Accept: application/json - -``` - -```javascript -var headers = { - 'Accept':'application/json' - -}; - -$.ajax({ - url: 'https://*.modapi.io/v1/ping', - method: 'get', - - headers: headers, - success: function(data) { - console.log(JSON.stringify(data)); - } -}) -``` - -```javascript--nodejs -const request = require('node-fetch'); - -const headers = { - 'Accept':'application/json' - -}; - -fetch('https://*.modapi.io/v1/ping', -{ - method: 'GET', - - headers: headers -}) -.then(function(res) { - return res.json(); -}).then(function(body) { - console.log(body); -}); -``` - -```python -import requests -headers = { - 'Accept': 'application/json' -} - -r = requests.get('https://*.modapi.io/v1/ping', params={ - -}, headers = headers) - -print r.json() -``` - -```java -URL obj = new URL("https://*.modapi.io/v1/ping"); -HttpURLConnection con = (HttpURLConnection) obj.openConnection(); -con.setRequestMethod("GET"); -int responseCode = con.getResponseCode(); -BufferedReader in = new BufferedReader( - new InputStreamReader(con.getInputStream())); -String inputLine; -StringBuffer response = new StringBuffer(); -while ((inputLine = in.readLine()) != null) { - response.append(inputLine); -} -in.close(); -System.out.println(response.toString()); -``` - -`GET //ping` - -Ping the mod.io API for purpose of a reachability check, successful request will return a 200 OK with a [Web Message Object](#web-message-object). - -> Example response - -```json -{ - "code": 200, - "success": true, - "message": "You have successfully logged out of mod.io." -} - -``` -

Responses

- -Status|Meaning|Error Ref|Description|Response Schema ----|---|----|---|---| -200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Request Successful|[Web Message Object](#schemaweb_message_object) - - ## Get Authenticated User > Example request @@ -15568,6 +15459,115 @@ Status|Meaning|Error Ref|Description|Response Schema To perform this request, you must be authenticated via one of the following methods: OAuth 2 (Scopes: read) +## Ping + +> Example request + +```shell +# You can also use wget +curl -X GET https://*.modapi.io/v1/ping \ + -H 'Accept: application/json' + +``` + +```http +GET https://*.modapi.io/v1/ping HTTP/1.1 +Host: *.modapi.io + +Accept: application/json + +``` + +```javascript +var headers = { + 'Accept':'application/json' + +}; + +$.ajax({ + url: 'https://*.modapi.io/v1/ping', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) +``` + +```javascript--nodejs +const request = require('node-fetch'); + +const headers = { + 'Accept':'application/json' + +}; + +fetch('https://*.modapi.io/v1/ping', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); +``` + +```python +import requests +headers = { + 'Accept': 'application/json' +} + +r = requests.get('https://*.modapi.io/v1/ping', params={ + +}, headers = headers) + +print r.json() +``` + +```java +URL obj = new URL("https://*.modapi.io/v1/ping"); +HttpURLConnection con = (HttpURLConnection) obj.openConnection(); +con.setRequestMethod("GET"); +int responseCode = con.getResponseCode(); +BufferedReader in = new BufferedReader( + new InputStreamReader(con.getInputStream())); +String inputLine; +StringBuffer response = new StringBuffer(); +while ((inputLine = in.readLine()) != null) { + response.append(inputLine); +} +in.close(); +System.out.println(response.toString()); +``` + +`GET /ping` + +Ping the mod.io API for purpose of a reachability check, successful request will return a 200 OK with a [Web Message Object](#web-message-object). + +> Example response + +```json +{ + "code": 200, + "success": true, + "message": "You have successfully logged out of mod.io." +} + +``` +

Responses

+ +Status|Meaning|Error Ref|Description|Response Schema +---|---|----|---|---| +200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)||Request Successful|[Web Message Object](#schemaweb_message_object) + + # Monetization ## Get Game Token Packs