Skip to content

Latest commit

 

History

History
600 lines (416 loc) · 19.3 KB

ProfilesApi.md

File metadata and controls

600 lines (416 loc) · 19.3 KB

Verdigado\GrueneApiClient\ProfilesApi

All URIs are relative to https://api.gruene.de, except if the operation defines another base path.

Method HTTP request Description
createProfile() POST /v1/profiles Create user profile
deleteProfile() DELETE /v1/profiles/{profileId} Delete user profile
deleteProfileImage() DELETE /v1/profiles/{profileId}/image Delete user profile image
findProfileTags() GET /v1/profile-tags List profile tags
findProfiles() GET /v1/profiles Find user profiles
getOwnProfile() GET /v1/profiles/self Get the authenticated user's profile
getProfile() GET /v1/profiles/{profileId} Get a user profile
updateProfile() PUT /v1/profiles/{profileId} Update user profile
updateProfileImage() PUT /v1/profiles/{profileId}/image Update profile image

createProfile()

createProfile($create_profile): \Verdigado\GrueneApiClient\models\Profile

Create user profile

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$create_profile = new \Verdigado\GrueneApiClient\models\CreateProfile(); // \Verdigado\GrueneApiClient\models\CreateProfile

try {
    $result = $apiInstance->createProfile($create_profile);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->createProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
create_profile \Verdigado\GrueneApiClient\models\CreateProfile

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

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

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

deleteProfile()

deleteProfile($profile_id): \Verdigado\GrueneApiClient\models\Profile

Delete user profile

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$profile_id = 'profile_id_example'; // string

try {
    $result = $apiInstance->deleteProfile($profile_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->deleteProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

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

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

deleteProfileImage()

deleteProfileImage($profile_id): \Verdigado\GrueneApiClient\models\Profile

Delete user profile image

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$profile_id = 'profile_id_example'; // string

try {
    $result = $apiInstance->deleteProfileImage($profile_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->deleteProfileImage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

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

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

findProfileTags()

findProfileTags($limit, $offset, $search, $type): \Verdigado\GrueneApiClient\models\FindProfileTagsResponse

List profile tags

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 20; // float
$offset = 3.4; // float
$search = 'search_example'; // string | Search label attributes for substring
$type = interest; // string | Filter by type

try {
    $result = $apiInstance->findProfileTags($limit, $offset, $search, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->findProfileTags: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit float [optional] [default to 20]
offset float [optional]
search string Search label attributes for substring [optional]
type string Filter by type [optional]

Return type

\Verdigado\GrueneApiClient\models\FindProfileTagsResponse

Authorization

api_key, bearer

HTTP request headers

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

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

findProfiles()

findProfiles($limit, $tags, $offset, $search, $division): \Verdigado\GrueneApiClient\models\FindProfilesResponse

Find user profiles

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$limit = 20; // float
$tags = array('tags_example'); // string[] | Filter by profile tag ids
$offset = 3.4; // float
$search = 'search_example'; // string | Search term to look for in firstName, lastName and username
$division = 'division_example'; // string | Division key to filter profiles. Only include profiles that are member of given division.

try {
    $result = $apiInstance->findProfiles($limit, $tags, $offset, $search, $division);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->findProfiles: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
limit float [optional] [default to 20]
tags string[] Filter by profile tag ids [optional]
offset float [optional]
search string Search term to look for in firstName, lastName and username [optional]
division string Division key to filter profiles. Only include profiles that are member of given division. [optional]

Return type

\Verdigado\GrueneApiClient\models\FindProfilesResponse

Authorization

api_key, bearer

HTTP request headers

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

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

getOwnProfile()

getOwnProfile(): \Verdigado\GrueneApiClient\models\Profile

Get the authenticated user's profile

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->getOwnProfile();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->getOwnProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

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

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

getProfile()

getProfile($profile_id): \Verdigado\GrueneApiClient\models\PublicProfile

Get a user profile

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$profile_id = 'profile_id_example'; // string

try {
    $result = $apiInstance->getProfile($profile_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->getProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string

Return type

\Verdigado\GrueneApiClient\models\PublicProfile

Authorization

api_key, bearer

HTTP request headers

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

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

updateProfile()

updateProfile($profile_id, $update_profile): \Verdigado\GrueneApiClient\models\Profile

Update user profile

When updating the collection attributes like messengers all items must be included. Omitting an item means it will be deleted. If an id attribute is present it means update the give item. Omitting the id attribute will add a new item to the collection.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$profile_id = 'profile_id_example'; // string
$update_profile = new \Verdigado\GrueneApiClient\models\UpdateProfile(); // \Verdigado\GrueneApiClient\models\UpdateProfile

try {
    $result = $apiInstance->updateProfile($profile_id, $update_profile);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->updateProfile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string
update_profile \Verdigado\GrueneApiClient\models\UpdateProfile

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

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

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

updateProfileImage()

updateProfileImage($profile_id, $profile_image): \Verdigado\GrueneApiClient\models\Profile

Update profile image

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure Bearer (JWT) authorization: bearer
$config = Verdigado\GrueneApiClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Verdigado\GrueneApiClient\Api\ProfilesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$profile_id = 'profile_id_example'; // string
$profile_image = "/path/to/file.txt"; // \SplFileObject

try {
    $result = $apiInstance->updateProfileImage($profile_id, $profile_image);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProfilesApi->updateProfileImage: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
profile_id string
profile_image \SplFileObject**\SplFileObject**

Return type

\Verdigado\GrueneApiClient\models\Profile

Authorization

api_key, bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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