Skip to content

Latest commit

 

History

History
282 lines (205 loc) · 8.74 KB

BadgeCollectionConceptControllerApi.md

File metadata and controls

282 lines (205 loc) · 8.74 KB

BadgeCollectionConceptControllerApi

All URIs are relative to https://localhost/gamification

Method HTTP request Description
addBadgeUsingPOST POST /model/game/{gameId}/badges Add a badge collection
deleteBadgeCollectionUsingDELETE DELETE /model/game/{gameId}/badges/{collectionId} Delete a badge collection
readBadgeCollectionUsingGET GET /model/game/{gameId}/badges/{collectionId} Get a badge collection
readBadgeCollectionsUsingGET GET /model/game/{gameId}/badges Get the badge collections
updateBadgeCollectionUsingPUT PUT /model/game/{gameId}/badges/{collectionId} Update a badge collection

addBadgeUsingPOST

addBadgeUsingPOST(gameId, badge)

Add a badge collection

Add a badge collection to the game definition

Example

// Import classes:
//import it.smartcommunitylab.ApiClient;
//import it.smartcommunitylab.ApiException;
//import it.smartcommunitylab.Configuration;
//import it.smartcommunitylab.auth.*;
//import it.smartcommunitylab.basic.api.BadgeCollectionConceptControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

BadgeCollectionConceptControllerApi apiInstance = new BadgeCollectionConceptControllerApi();
String gameId = "gameId_example"; // String | gameId
BadgeCollectionConcept badge = new BadgeCollectionConcept(); // BadgeCollectionConcept | badge
try {
    apiInstance.addBadgeUsingPOST(gameId, badge);
} catch (ApiException e) {
    System.err.println("Exception when calling BadgeCollectionConceptControllerApi#addBadgeUsingPOST");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
gameId String gameId
badge BadgeCollectionConcept badge

Return type

null (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteBadgeCollectionUsingDELETE

deleteBadgeCollectionUsingDELETE(gameId, collectionId)

Delete a badge collection

Example

// Import classes:
//import it.smartcommunitylab.ApiClient;
//import it.smartcommunitylab.ApiException;
//import it.smartcommunitylab.Configuration;
//import it.smartcommunitylab.auth.*;
//import it.smartcommunitylab.basic.api.BadgeCollectionConceptControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

BadgeCollectionConceptControllerApi apiInstance = new BadgeCollectionConceptControllerApi();
String gameId = "gameId_example"; // String | gameId
String collectionId = "collectionId_example"; // String | collectionId
try {
    apiInstance.deleteBadgeCollectionUsingDELETE(gameId, collectionId);
} catch (ApiException e) {
    System.err.println("Exception when calling BadgeCollectionConceptControllerApi#deleteBadgeCollectionUsingDELETE");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
gameId String gameId
collectionId String collectionId

Return type

null (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

readBadgeCollectionUsingGET

BadgeCollectionConcept readBadgeCollectionUsingGET(gameId, collectionId)

Get a badge collection

Get the definition of a badge collection in a game

Example

// Import classes:
//import it.smartcommunitylab.ApiClient;
//import it.smartcommunitylab.ApiException;
//import it.smartcommunitylab.Configuration;
//import it.smartcommunitylab.auth.*;
//import it.smartcommunitylab.basic.api.BadgeCollectionConceptControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

BadgeCollectionConceptControllerApi apiInstance = new BadgeCollectionConceptControllerApi();
String gameId = "gameId_example"; // String | gameId
String collectionId = "collectionId_example"; // String | collectionId
try {
    BadgeCollectionConcept result = apiInstance.readBadgeCollectionUsingGET(gameId, collectionId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BadgeCollectionConceptControllerApi#readBadgeCollectionUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
gameId String gameId
collectionId String collectionId

Return type

BadgeCollectionConcept

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

readBadgeCollectionsUsingGET

List<BadgeCollectionConcept> readBadgeCollectionsUsingGET(gameId)

Get the badge collections

Get badge collections in a game

Example

// Import classes:
//import it.smartcommunitylab.ApiClient;
//import it.smartcommunitylab.ApiException;
//import it.smartcommunitylab.Configuration;
//import it.smartcommunitylab.auth.*;
//import it.smartcommunitylab.basic.api.BadgeCollectionConceptControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

BadgeCollectionConceptControllerApi apiInstance = new BadgeCollectionConceptControllerApi();
String gameId = "gameId_example"; // String | gameId
try {
    List<BadgeCollectionConcept> result = apiInstance.readBadgeCollectionsUsingGET(gameId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling BadgeCollectionConceptControllerApi#readBadgeCollectionsUsingGET");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
gameId String gameId

Return type

List<BadgeCollectionConcept>

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateBadgeCollectionUsingPUT

updateBadgeCollectionUsingPUT(gameId)

Update a badge collection

Example

// Import classes:
//import it.smartcommunitylab.ApiClient;
//import it.smartcommunitylab.ApiException;
//import it.smartcommunitylab.Configuration;
//import it.smartcommunitylab.auth.*;
//import it.smartcommunitylab.basic.api.BadgeCollectionConceptControllerApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

BadgeCollectionConceptControllerApi apiInstance = new BadgeCollectionConceptControllerApi();
String gameId = "gameId_example"; // String | gameId
try {
    apiInstance.updateBadgeCollectionUsingPUT(gameId);
} catch (ApiException e) {
    System.err.println("Exception when calling BadgeCollectionConceptControllerApi#updateBadgeCollectionUsingPUT");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
gameId String gameId

Return type

null (empty response body)

Authorization

basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json