Skip to content

PostPuma/java-sdk

Repository files navigation

openapi-java-client

PostPuma - OpenAPI 3.0

  • API version: 1.0.0
    • Build date: 2024-10-24T16:39:28.677807+02:00[Europe/Berlin]
    • Generator version: 7.9.0

PostPuma API specifications

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'openapi-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'openapi-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.openapitools:openapi-java-client:1.0.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import PostPuma.ApiClient;
import PostPuma.ApiException;
import PostPuma.Configuration;
import PostPuma.auth.*;
import org.openapitools.client.model.*;
import PostPuma.AccountsApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://app.postpuma.com/app/5afgg2-1egj4n-7612ng-g313ie");
    
    // Configure HTTP bearer authorization: bearerAuth
    HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
    bearerAuth.setBearerToken("BEARER TOKEN");

    AccountsApi apiInstance = new AccountsApi(defaultClient);
    String accountUuid = "accountUuid_example"; // String | Account UUID
    try {
      Account result = apiInstance.getAccount(accountUuid);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AccountsApi#getAccount");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://app.postpuma.com/app/5afgg2-1egj4n-7612ng-g313ie

Class Method HTTP request Description
AccountsApi getAccount GET /accounts/{accountUuid} Get account
AccountsApi listAccounts GET /accounts List accounts
MediaApi deleteMediaFiles DELETE /media Delete media files
MediaApi getMediaFile GET /media/{mediaUuid} Get media file
MediaApi listMediaFiles GET /media List media files
MediaApi uploadMediaFile POST /media Upload media file
PostsApi createPost POST /posts Create post
PostsApi deletePost DELETE /posts/{postUuid} Delete post
PostsApi deletePosts DELETE /posts Delete posts
PostsApi getPost GET /posts/{postUuid} Get post
PostsApi listPosts GET /posts List posts
PostsApi queuePost POST /posts/add-to-queue/{postUuid} Queue post
PostsApi schedulePost POST /posts/schedule/{postUuid} Schedule post
PostsApi updatePost PUT /posts/{postUuid} Update post
TagsApi createTag POST /tags Create tag
TagsApi deleteTag DELETE /tags/{tagUuid} Delete tag
TagsApi getTag GET /tags/{tagUuid} Get tag
TagsApi listTags GET /tags List tags
TagsApi updateTag PUT /tags/{tagUuid} Update tag

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: HTTP Bearer Token authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

support@postpuma.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors