Giter Club home page Giter Club logo

rakam-java-client's Introduction

rakam-client

Requirements

Building the API client library requires Maven to be installed.

Installation

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

mvn install

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

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.rakam</groupId>
    <artifactId>rakam-client</artifactId>
    <version>0.5</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.rakam:rakam-client:0.5"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/rakam-client-0.5.jar
  • target/lib/*.jar

Getting Started

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

import io.rakam.*;
import io.rakam.auth.*;
import io.rakam.model.*;
import io.rakam.client.api.AdminApi;

import java.io.File;
import java.util.*;

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: master_key
        ApiKeyAuth master_key = (ApiKeyAuth) defaultClient.getAuthentication("master_key");
        master_key.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //master_key.setApiKeyPrefix("Token");

        AdminApi apiInstance = new AdminApi();
        ProjectAddCustomFieldsToSchema projectAddCustomFieldsToSchema = new ProjectAddCustomFieldsToSchema(); // ProjectAddCustomFieldsToSchema | 
        try {
            List<SchemaField> result = apiInstance.addCustomFieldsToSchema(projectAddCustomFieldsToSchema);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#addCustomFieldsToSchema");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://app.rakam.io/

Class Method HTTP request Description
AdminApi addCustomFieldsToSchema POST /project/schema/add/custom Add fields to collections by transforming other schemas
AdminApi addFieldsToSchema POST /project/schema/add Add fields to collections
AdminApi checkApiKeys POST /project/check-api-keys Create API Keys
AdminApi checkLockKey POST /admin/lock_key Check lock key
AdminApi collections POST /project/collection Get collection names
AdminApi createApiKeys POST /project/create-api-keys Create API Keys
AdminApi createProject POST /project/create Create project
AdminApi deleteProject DELETE /project/delete Delete project
AdminApi getConfigurations GET /admin/configurations List installed modules
AdminApi getProjects GET /project/list List created projects
AdminApi getStats POST /project/stats Get project stats
AdminApi getTypes GET /admin/types Get types
AdminApi revokeApiKeys DELETE /project/revoke-api-keys Revoke API Keys
AdminApi schema POST /project/schema Get collection schema
CollectApi batchEvents POST /event/batch Collect multiple events
CollectApi bulkEvents POST /event/bulk Collect Bulk events
CollectApi bulkEventsRemote POST /event/bulk/remote Collect bulk events from remote
CollectApi collectEvent POST /event/collect Collect event
CollectApi commitBulkEvents POST /event/bulk/commit Commit Bulk events
ContinuousqueryApi createQuery POST /continuous-query/create Create stream
ContinuousqueryApi deleteQuery POST /continuous-query/delete Delete stream
ContinuousqueryApi getQuery POST /continuous-query/get Get continuous query
ContinuousqueryApi getSchemaOfQuery POST /continuous-query/schema Get query schema
ContinuousqueryApi listQueries POST /continuous-query/list List queries
ContinuousqueryApi testQuery POST /continuous-query/test Test continuous query
EventexplorerApi analyzeEvents POST /event-explorer/analyze Perform simple query on event data
EventexplorerApi createPrecomputedTable POST /event-explorer/pre_calculate Create Pre-computed table
EventexplorerApi getEventStatistics POST /event-explorer/statistics Event statistics
EventexplorerApi getExtraDimensions GET /event-explorer/extra_dimensions Event statistics
FunnelApi analyzeFunnel POST /funnel/analyze Execute query
MaterializedviewApi createView POST /materialized-view/create Create view
MaterializedviewApi deleteView POST /materialized-view/delete Delete materialized view
MaterializedviewApi getSchemaOfView POST /materialized-view/schema Get schemas
MaterializedviewApi getView POST /materialized-view/get Get view
MaterializedviewApi listViews POST /materialized-view/list List views
QueryApi execute POST /query/execute Execute query on event data-set
QueryApi explain POST /query/explain Explain query
QueryApi metadata POST /query/metadata Test query
RealtimeApi createTable POST /realtime/create Create report
RealtimeApi deleteTable POST /realtime/delete Delete report
RealtimeApi listTables POST /realtime/list List queries
RealtimeApi queryTable POST /realtime/get Get report
RecipeApi exportRecipe GET /recipe/export Export recipe
RecipeApi installRecipe POST /recipe/install Install recipe
RetentionApi analyzeRetention POST /retention/analyze Execute query
UserApi createSegment POST /user/create_segment Get events of the user
UserApi createUser POST /user/create Create new user
UserApi createUsers POST /user/batch/create Create multiple new users
UserApi getEvents POST /user/get_events Get events of the user
UserApi getMetadata GET /user/metadata Get user storage metadata
UserApi getUser POST /user/get Get user
UserApi incrementProperty POST /user/increment_property Set user property
UserApi searchUsers POST /user/search Search users
UserApi setProperties POST /user/set_properties Set user properties
UserApi setPropertiesOnce POST /user/set_properties_once Set user properties once
UserApi unsetProperty POST /user/unset_properties Unset user property
UseractionApi batch POST /user/action/email/batch Apply batch operation
UseractionApi send POST /user/action/email/single Perform action for single user

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

read_key

  • Type: API key
  • API key parameter name: read_key
  • Location: HTTP header

master_key

  • Type: API key
  • API key parameter name: master_key
  • Location: HTTP header

write_key

  • Type: API key
  • API key parameter name: write_key
  • Location: HTTP header

Recommendation

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

Author

[email protected]

rakam-java-client's People

Contributors

buremba avatar

Watchers

James Cloos avatar Sreekanth avatar

Forkers

maduhu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.