Content Delivery

Introduction

Your app can receive content using the Ocugine cloud storage. You can download the necessary content through the control panel Ocugine, to continue to get it inside the application. This way you can get additional content for games, DLC or updates.

Calling methods

The Cloud object is used to invoke methods. All methods are located within this URL:

https://cp.ocugine.pro/api/cloud/

Available methods for working with content delivery

Method Usage For
Cloud.get_content_list Get list of content API/SDK
Cloud.get_content Get content data API/SDK

Cloud.get_content_list

This method is designed to get a list of content from the cloud that you previously uploaded in the Ocugine control panel.

Method URL

https://cp.ocugine.pro/api/cloud/get_content_list/

Request Data

Name Type Usage
app_id double Ocugine Project ID
app_key string Ocugine Client Key
lang (Not required) string Response Language.

Response data

Name Type Usage
complete bool Operation Status
message string Message error. If complete = false, returns null.
list array Content list

Response Example

{
  "complete": true,
  "message": "",
  "data": {
    "list": [
      {
        "project_id": "1",
        "uid": "1",
        "content_slug": "test_content",
        "time": "0"
      },
      {
        "project_id": "1",
        "uid": "2",
        "content_slug": "test_content2",
        "time": "0"
      }
    ]
  }
}

Cloud.get_content

This method is intended to obtain information about the content that you plan to download. This content must be preloaded by you in the Ocugine control panel.

Method URL

https://cp.ocugine.pro/api/cloud/get_content/

Request Data

Name Type Usage
app_id double Ocugine Project ID
app_key string Ocugine Client Key
cid double Content ID
lang (Not required) string Response Language.

Response Data

Name Type Usage
complete bool Operation Status
message string Message error. If complete = false, returns null.
info object Content information data

Response Example

{
  "complete": true,
  "message": "",
  "data": {
    "info": {
      "uid": "1",
      "project_id": "1",
      "content_slug": "test_content",
      "content_url": "https://cp.ocugine.pro/storage/1/asd87nasdkzxc.occ",
      "content_size": "42356",
      "time": "0"
    }
  }
}

Content info object

Name Type Usage
uid double Content ID
project_id double Project ID
content_slug string Content System Name
content_url string Content URL
content_size double Content Size (bytes)
time double Content creation time