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.1.tar.gz
(29.8 kB
view hashes)
Built Distribution
fusio_sdk-5.0.1-py3-none-any.whl
(126.8 kB
view hashes)
Close
Hashes for fusio_sdk-5.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e904b24899a63babb77882d5396ba0bc2c6e3c696330b3d80b889977ac55bd79 |
|
MD5 | 4cacee413c4475b5414a473ab3fed77f |
|
BLAKE2b-256 | 5893f45ae0bd3bc5f0658ff36aa5e1659457f5f69c409b209ad965c2a5e59d3f |