Skip to content

Latest commit

 

History

History
308 lines (245 loc) · 10.8 KB

ActivityApi.md

File metadata and controls

308 lines (245 loc) · 10.8 KB

Pieces.Os.Core.Api.ActivityApi

All URIs are relative to http://localhost:1000

Method HTTP request Description
ActivitiesSpecificActivitySnapshot GET /activity/{activity} /activity/{activity} [GET]
ActivityIdentifiersSnapshot GET /activity/identifiers /activity/identifiers [GET]
ActivityUpdate POST /activity/update /activity/update [POST]

ActivitiesSpecificActivitySnapshot

Activity ActivitiesSpecificActivitySnapshot (string activity, bool? transferables = null)

/activity/{activity} [GET]

This will attempt to get a specific activity.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class ActivitiesSpecificActivitySnapshotExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new ActivityApi(config);
            var activity = "activity_example";  // string | This is a specific activity uuid.
            var transferables = true;  // bool? | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) (optional) 

            try
            {
                // /activity/{activity} [GET]
                Activity result = apiInstance.ActivitiesSpecificActivitySnapshot(activity, transferables);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ActivityApi.ActivitiesSpecificActivitySnapshot: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ActivitiesSpecificActivitySnapshotWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // /activity/{activity} [GET]
    ApiResponse<Activity> response = apiInstance.ActivitiesSpecificActivitySnapshotWithHttpInfo(activity, transferables);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ActivityApi.ActivitiesSpecificActivitySnapshotWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
activity string This is a specific activity uuid.
transferables bool? This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) [optional]

Return type

Activity

Authorization

application

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

HTTP response details

Status code Description Response headers
200 OK -
410 Activity was not found. -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ActivityIdentifiersSnapshot

FlattenedActivities ActivityIdentifiersSnapshot (bool? pseudo = null, string activityFilterEnum = null)

/activity/identifiers [GET]

This is going to return all the identifiers of the activity event in order of most recent -> oldest.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class ActivityIdentifiersSnapshotExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new ActivityApi(config);
            var pseudo = true;  // bool? | This is helper boolean that will give you the ability to also include your pseudo assets, we will always default to false. (optional) 
            var activityFilterEnum = "CREATED";  // string | This is an ActivityFilterEnum as a optional filter. Ensure you update ActivityFilterEnum if this is updated. (optional) 

            try
            {
                // /activity/identifiers [GET]
                FlattenedActivities result = apiInstance.ActivityIdentifiersSnapshot(pseudo, activityFilterEnum);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ActivityApi.ActivityIdentifiersSnapshot: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ActivityIdentifiersSnapshotWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // /activity/identifiers [GET]
    ApiResponse<FlattenedActivities> response = apiInstance.ActivityIdentifiersSnapshotWithHttpInfo(pseudo, activityFilterEnum);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ActivityApi.ActivityIdentifiersSnapshotWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
pseudo bool? This is helper boolean that will give you the ability to also include your pseudo assets, we will always default to false. [optional]
activityFilterEnum string This is an ActivityFilterEnum as a optional filter. Ensure you update ActivityFilterEnum if this is updated. [optional]

Return type

FlattenedActivities

Authorization

application

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

HTTP response details

Status code Description Response headers
200 OK -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ActivityUpdate

Activity ActivityUpdate (bool? transferables = null, Activity activity = null)

/activity/update [POST]

this will update a specific activity.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class ActivityUpdateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new ActivityApi(config);
            var transferables = true;  // bool? | This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) (optional) 
            var activity = new Activity(); // Activity |  (optional) 

            try
            {
                // /activity/update [POST]
                Activity result = apiInstance.ActivityUpdate(transferables, activity);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ActivityApi.ActivityUpdate: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ActivityUpdateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // /activity/update [POST]
    ApiResponse<Activity> response = apiInstance.ActivityUpdateWithHttpInfo(transferables, activity);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ActivityApi.ActivityUpdateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
transferables bool? This is a boolean that will decided if we are want to return the transferable data (default) or not(performance enhancement) [optional]
activity Activity [optional]

Return type

Activity

Authorization

application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

HTTP response details

Status code Description Response headers
200 OK -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]