Skip to content

Latest commit

 

History

History
152 lines (115 loc) · 8.15 KB

README.md

File metadata and controls

152 lines (115 loc) · 8.15 KB

Collections

(issueTracking().collections())

Overview

Available Operations

  • list - List Collections
  • get - Get Collection

list

List Collections

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.components.CollectionsSort;
import com.apideck.unify.models.components.CollectionsSortBy;
import com.apideck.unify.models.components.SortDirection;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.IssueTrackingCollectionsAllRequest;
import com.apideck.unify.models.operations.IssueTrackingCollectionsAllResponse;
import java.lang.Exception;
import java.util.Map;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        IssueTrackingCollectionsAllRequest req = IssueTrackingCollectionsAllRequest.builder()
                .serviceId("salesforce")
                .sort(CollectionsSort.builder()
                    .by(CollectionsSortBy.NAME)
                    .direction(SortDirection.DESC)
                    .build())
                .passThrough(Map.ofEntries(
                    Map.entry("search", "San Francisco")))
                .fields("id,updated_at")
                .build();

        IssueTrackingCollectionsAllResponse res = sdk.issueTracking().collections().list()
                .request(req)
                .call();

        if (res.getCollectionsResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request IssueTrackingCollectionsAllRequest ✔️ The request object to use for the request.

Response

IssueTrackingCollectionsAllResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*

get

Get Collection

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.BadRequestResponse;
import com.apideck.unify.models.errors.NotFoundResponse;
import com.apideck.unify.models.errors.PaymentRequiredResponse;
import com.apideck.unify.models.errors.UnauthorizedResponse;
import com.apideck.unify.models.errors.UnprocessableResponse;
import com.apideck.unify.models.operations.IssueTrackingCollectionsOneRequest;
import com.apideck.unify.models.operations.IssueTrackingCollectionsOneResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws BadRequestResponse, UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, UnprocessableResponse, Exception {

        Apideck sdk = Apideck.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .consumerId("test-consumer")
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
            .build();

        IssueTrackingCollectionsOneRequest req = IssueTrackingCollectionsOneRequest.builder()
                .collectionId("apideck-io")
                .serviceId("salesforce")
                .fields("id,updated_at")
                .build();

        IssueTrackingCollectionsOneResponse res = sdk.issueTracking().collections().get()
                .request(req)
                .call();

        if (res.getCollectionResponse().isPresent()) {
            // handle response
        }
    }
}

Parameters

Parameter Type Required Description
request IssueTrackingCollectionsOneRequest ✔️ The request object to use for the request.

Response

IssueTrackingCollectionsOneResponse

Errors

Error Type Status Code Content Type
models/errors/BadRequestResponse 400 application/json
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/UnprocessableResponse 422 application/json
models/errors/APIException 4XX, 5XX */*