SDK to talk to the Fusio REST API
Project description
Fusio Python SDK
This is the official Fusio Java CSharp, it helps to talk to the Fusio REST API. Fusio is an open source API management system, more information at: https://www.fusio-project.org
Usage
The following example shows how you can get all registered routes at the backend. A working example is also available at: https://github.com/apioo/fusio-sample-csharp-cli
package org.fusioproject.sample;
import app.sdkgen.client.Credentials.OAuth2;
import app.sdkgen.client.CredentialsInterface;
import app.sdkgen.client.Exception.ClientException;
import app.sdkgen.client.TokenStore.MemoryTokenStore;
import app.sdkgen.client.TokenStoreInterface;
import org.fusioproject.sdk.BackendOperationCollection;
import org.fusioproject.sdk.Client;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws ClientException {
List<String> scopes = new ArrayList<>();
scopes.add("backend");
TokenStoreInterface tokenStore = new MemoryTokenStore();
CredentialsInterface credentials = new OAuth2("test", "FRsNh1zKCXlB", "https://demo.fusio-project.org/authorization/token", "", tokenStore, scopes);
Client client = new Client("https://demo.fusio-project.org/", credentials);
BackendOperationCollection operations = client.backend().operation().getAll(0, 16, "");
System.out.println("Operations:");
for (int i = 0; i < operations.getEntry().size(); i++) {
System.out.println("* " + operations.getEntry().get(i).getHttpMethod() + " " + operations.getEntry().get(i).getHttpPath());
}
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fusio-sdk-5.0.5.tar.gz
(32.8 kB
view hashes)
Built Distribution
fusio_sdk-5.0.5-py3-none-any.whl
(138.1 kB
view hashes)
Close
Hashes for fusio_sdk-5.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23260a498a825aff0eef2dbf330796f3d308cae36db0204cf1560177cbde09b1 |
|
MD5 | f9a0b4c83ca41abbda64b20cca2e6b48 |
|
BLAKE2b-256 | 91d54fcba76e8727a1fdd12528a09a1bc42ea40cb44343a7e002fe2ac999b0fe |