Platforms(Create, Read, Update, Delete)

1. Set up your platform

To create a new Solana Play platform, you'll need to make a POST request to the /platforms endpoint. Make sure to fill in the required fields in the request body.

POST /api/solanaplay/platforms

Request body:

{
  "platformId": "unique-platform-id",
  "name": "platform-name",
  "url": "http://example.com",
  "twitter": "twitter-handle",
  "discordInvite": "http://example.com",
  "image": "image-url",
  "description": "platform-description",
  "category": "platform-category",
  "subcategory": "platform-subcategory",
  "tags": [
    "tag1",
    "tag2",
    "tag3"
  ]
}

Response examples: You will receive response 200(success) :

Or a default message error:

If successful you will receive a platformId, platCustPub, and platformRefId in the response. Make sure you keep them in a safe place, as you will need them later. If in the event of an error a default message will occur.

2. Manage Platform

Next, you'll need to manage the already created platform. To do this, make a GET request to the platforms/{id} endpoint with your {id}. GET /api/solanaplay/platforms/{id}

Response examples: You will receive response 200(success) :

Or a default message error:

If successful will receive an overview of a single platform with id. If in the event of an error a default message will occur.

3. Update Platform

Next, you'll need to know how to change/update the already created platforms. To do this, make a PUT request to the platforms/{id} endpoint with your {id}. PUT /api/solanaplay/platforms/{id}

Response examples: You will receive response 200(success) :

Or a default message error:

You will receive an updated overview of a platform item with id. If in the event of an error a default message will occur.

4. Delete item

Next, you will need to know how to delete the already created platforms. To do this, make a DELETE request to the /platforms{id} endpoint with your {id}. DELETE /api/solanaplay/platforms/{id} You will receive response 200 :

Or a default message error:

If successful you will receive a successful status 200 for the platform deleted. If in the event of an error a default message will occur.

5. Manage all Items

Next, you will need to know how to manage all of the the already created platforms . To do this, make a GET request to the /platforms. GET /api/solanaplay/platforms

Response examples: You will receive response 200(success) :

Or a default message error:

If successful you will receive an overview of all platforms with id. If in the event of an error a default message will occur.