Skip to content

Ruby JSON client-side library that defines the Ruby classes that can be (de)serialized to/from JSON. This is useful for accessing the REST endpoints that are published by the madana-api, but only those that produce a JSON representation of their resources (content type "application/json").

Notifications You must be signed in to change notification settings

MADANA-IO/madana-apiclient-ruby

Repository files navigation

madana-sampleclient-ruby

MadanaSampleclientRuby - the Ruby gem for the madana-api

Using the madana-api

This documentation contains a Quickstart Guide, relating client functionality and information about the available endpoints and used datamodels.

The madana-api and its implementations are still in heavy development. This means that there may be problems in our protocols, or there may be mistakes in our implementations. We take security vulnerabilities very seriously. If you discover a security issue, please bring it to our attention right away! If you find a vulnerability that may affect live deployments -- for example, by exposing a remote execution exploit -- please send your report privately to info@madana.io. Please DO NOT file a public issue. If the issue is a protocol weakness that cannot be immediately exploited or something not yet deployed, just discuss it openly


Note: Not all functionality might be acessible without having accquired and api-license token. For more information visit www.madana.io


This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.4.14-master.16
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build madana-sampleclient-ruby.gemspec

Then either install the gem locally:

gem install ./madana-sampleclient-ruby-1.0.0.gem

(for development, run gem install --dev ./madana-sampleclient-ruby-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'madana-sampleclient-ruby', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO, then add the following in the Gemfile:

gem 'madana-sampleclient-ruby', :git => 'https:///YOUR_GIT_USERNAME/YOUR_GIT_REPO.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'madana-sampleclient-ruby'

api_instance =   MadanaSampleclientRuby::AccountServiceApi.new
token = 'token_example' # String | 

begin
  result = api_instance.activate_user(token)
  p result
rescue   MadanaSampleclientRuby::ApiError => e
  puts "Exception when calling AccountServiceApi->activate_user: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://api.madana.io/rest

Class Method HTTP request Description
  • MadanaSampleclientRuby::AccountServiceApi* | activate_user | GET /account/activation/{token} |
  • MadanaSampleclientRuby::AccountServiceApi* | create_object | POST /account/password | Sends an Password reset mail to the given MailAddress.
  • MadanaSampleclientRuby::AccountServiceApi* | request_verification_mail | GET /account/verifymail | Used to request a new activation-mail for the user.
  • MadanaSampleclientRuby::AccountServiceApi* | update_object | PUT /account/password | Receives the Password reset and tries to set the provided password for the user.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | authenticate_application | POST /authentication/application | Authenticates a new application and returns the token.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | authenticate_ethereum_wallet | POST /authentication/ethereum/{wallet} |
  • MadanaSampleclientRuby::AuthenticationServiceApi* | authenticate_user | POST /authentication | Authenticates a new user and returns the token ( forbidden if the credentials cannot be validated ).
  • MadanaSampleclientRuby::AuthenticationServiceApi* | authenticate_with_ethereum_challenge | POST /authentication/ethereum/{wallet}/challenge |
  • MadanaSampleclientRuby::AuthenticationServiceApi* | get_fractal_authentication_url | GET /authentication/fractal | Returns the AUthorization URL to verify a Twitter Accounts.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | get_nonce_for_ethereum_wallet | GET /authentication/ethereum/{wallet} | Returns a nonce for the client which is used as content for the to be created signature.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | get_object | GET /authentication | Used to validate the active connection with the API.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | get_twitter_authentication_url | GET /authentication/twitter | Returns the AUthorization URL to verify a Twitter Accounts.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | set_facebook_uid | POST /authentication/facebook | Used as Callback URL when users have successfully authorized their facbeook account.
  • MadanaSampleclientRuby::AuthenticationServiceApi* | set_fractal_uid | POST /authentication/fractal |
  • MadanaSampleclientRuby::AuthenticationServiceApi* | set_twitter_uid | POST /authentication/twitter |
  • MadanaSampleclientRuby::CertificateServiceApi* | authenticate_certificate | POST /certificates | Issues certificates for logged-in users.
  • MadanaSampleclientRuby::CertificateServiceApi* | get_certificate | GET /certificates/root |
  • MadanaSampleclientRuby::CertificateServiceApi* | get_certificate_0 | GET /certificates/{fingerprint} |
  • MadanaSampleclientRuby::DataCollectionServiceApi* | get_methods_for_type | GET /datacollection/types/{name}/methods |
  • MadanaSampleclientRuby::DataCollectionServiceApi* | get_nodes | GET /datacollection/methods |
  • MadanaSampleclientRuby::DataCollectionServiceApi* | get_types | GET /datacollection/types |
  • MadanaSampleclientRuby::EnclaveServiceApi* | approve_enclave | POST /enclaves/{uuid}/approval |
  • MadanaSampleclientRuby::EnclaveServiceApi* | assign_enclave_agent | POST /enclaves/{uuid}/assign |
  • MadanaSampleclientRuby::EnclaveServiceApi* | attestate_enclave | POST /enclaves/{uuid}/attestation |
  • MadanaSampleclientRuby::EnclaveServiceApi* | create_enclave_run_request | POST /enclaves |
  • MadanaSampleclientRuby::EnclaveServiceApi* | get_enclave | GET /enclaves/{uuid} |
  • MadanaSampleclientRuby::EnclaveServiceApi* | get_enclave_types | GET /enclaves/types |
  • MadanaSampleclientRuby::EnclaveServiceApi* | get_enclaves | GET /enclaves | Returns UUIDs of existing analyses.
  • MadanaSampleclientRuby::EnclaveServiceApi* | kill_enclave | POST /enclaves/{uuid}/kill |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | delete_environment | DELETE /environments/{uuid} |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | delete_environment_subscription | DELETE /environments/{uuid}/subscribe |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | get_all_requests | GET /environments | Returns UUIDs of existing analyses.
  • MadanaSampleclientRuby::EnvironmentServiceApi* | get_environment | GET /environments/{uuid} |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | get_published_environments | GET /environments/published |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | get_subscribed_environments | GET /environments/subscriptions |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | publish_environment | POST /environments |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | subscribe_environment | POST /environments/{uuid}/subscribe |
  • MadanaSampleclientRuby::EnvironmentServiceApi* | update_environment | PUT /environments/{uuid} |
  • MadanaSampleclientRuby::NodeServiceApi* | get_bootstrap | GET /nodes/bootstrap |
  • MadanaSampleclientRuby::NodeServiceApi* | get_nodes2 | GET /nodes |
  • MadanaSampleclientRuby::NodeServiceApi* | post_node_info | POST /nodes |
  • MadanaSampleclientRuby::OrganizationServiceApi* | get_nodes3 | GET /organizations |
  • MadanaSampleclientRuby::RequestServiceApi* | add_data | POST /requests/{uuid}/data | Is used to upload and park the data till the AnalysisRequest gets processed.
  • MadanaSampleclientRuby::RequestServiceApi* | cancel_processing | POST /requests/{uuid}/cancel | Endpoint is called from the Analysis Processing entity to submit the result.
  • MadanaSampleclientRuby::RequestServiceApi* | create_new_request | POST /requests | Endpoint used to create a new Analysis Request.
  • MadanaSampleclientRuby::RequestServiceApi* | get_actions | GET /requests/actions |
  • MadanaSampleclientRuby::RequestServiceApi* | get_agent | GET /requests/{uuid}/agent | Is called from the APE to request all parked datasets.
  • MadanaSampleclientRuby::RequestServiceApi* | get_all_requests2 | GET /requests | Returns UUIDs of existing analyses.
  • MadanaSampleclientRuby::RequestServiceApi* | get_data | GET /requests/{uuid}/data | Is called from the APE to request all parked datasets.
  • MadanaSampleclientRuby::RequestServiceApi* | get_request | GET /requests/{uuid} | Returns the details for certain Request.
  • MadanaSampleclientRuby::RequestServiceApi* | get_result | GET /requests/{uuid}/result | Can be called from creator to request the AnalysisResult.
  • MadanaSampleclientRuby::RequestServiceApi* | get_status | GET /requests/stats |
  • MadanaSampleclientRuby::RequestServiceApi* | give_consent | POST /requests/{uuid}/consent | Used to give consent for request.
  • MadanaSampleclientRuby::RequestServiceApi* | init_request_parameters | POST /requests/{uuid} | Endpoint used initialized addition datacollection parameters for requester.
  • MadanaSampleclientRuby::RequestServiceApi* | set_agent | POST /requests/{uuid}/agent | Is called from the APE to request all parked datasets.
  • MadanaSampleclientRuby::RequestServiceApi* | set_result | POST /requests/{uuid}/result | Endpoint is called from the Analysis Processing entity to submit the result.
  • MadanaSampleclientRuby::SocialPlatformServiceApi* | get_platforms | GET /platforms | Used to Handle Incoming Webhooks from Facebook.
  • MadanaSampleclientRuby::SocialPlatformServiceApi* | listen_twitter_webhook | POST /platforms/twitter | Used to Handle Incoming Webhooks from Facebook.
  • MadanaSampleclientRuby::SocialPlatformServiceApi* | register_twitter_webhook | GET /platforms/twitter | Used to Handle Incoming Webhooks from Twitter.
  • MadanaSampleclientRuby::SocialServiceApi* | get_my_profile | GET /social/profiles/me |
  • MadanaSampleclientRuby::SocialServiceApi* | get_platforms2 | GET /social | Returns all Platforms / Systems that can be Connected to the MADANA Service.
  • MadanaSampleclientRuby::SocialServiceApi* | get_ranking | GET /social/ranking | Returns the Ranking by PTS within the System.
  • MadanaSampleclientRuby::SocialServiceApi* | get_social_platform_feed | GET /social/feed/{platform} |
  • MadanaSampleclientRuby::SocialServiceApi* | get_user_profile | GET /social/profiles/{username} |
  • MadanaSampleclientRuby::SocialServiceApi* | get_user_profile_0 | GET /social/profiles/{username}/simple |
  • MadanaSampleclientRuby::SystemServiceApi* | get_all_objects | GET /system/health |
  • MadanaSampleclientRuby::SystemServiceApi* | get_application | GET /system/usage | Return the current application usage.
  • MadanaSampleclientRuby::UserServiceApi* | create_object2 | POST /users | Creates a new user object.
  • MadanaSampleclientRuby::UserServiceApi* | delete_object | DELETE /users/{username} | Deletes an User based on the provided id and securitycontext.
  • MadanaSampleclientRuby::UserServiceApi* | delete_object_0 | DELETE /users/{username}/social/{platform}/{ident} | Deletes linked account from the user and securitycontext.
  • MadanaSampleclientRuby::UserServiceApi* | get_avatars | GET /users/{username}/avatars |
  • MadanaSampleclientRuby::UserServiceApi* | get_certificates | GET /users/{username}/certificates |
  • MadanaSampleclientRuby::UserServiceApi* | get_object2 | GET /users/{username} |
  • MadanaSampleclientRuby::UserServiceApi* | set_avatar | POST /users/{username}/avatars |
  • MadanaSampleclientRuby::UserServiceApi* | set_settings | POST /users/{username}/settings |
  • MadanaSampleclientRuby::UserServiceApi* | update_object2 | PUT /users/{username} | Updates Userproperties based on the provided user object.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

About

Ruby JSON client-side library that defines the Ruby classes that can be (de)serialized to/from JSON. This is useful for accessing the REST endpoints that are published by the madana-api, but only those that produce a JSON representation of their resources (content type "application/json").

Topics

Resources

Stars

Watchers

Forks

Languages