Skip to content

Latest commit

 

History

History
executable file
·
249 lines (172 loc) · 6.62 KB

File metadata and controls

executable file
·
249 lines (172 loc) · 6.62 KB

WalletPassJP\ProjectsApi

All URIs are relative to https://walletpass.jp/api/v1

Method HTTP request Description
createProject POST /projects Create new Project
deleteProject DELETE /projects/{project} Delete Project
getProjectByID GET /projects/{project} Get Project
listProjects GET /projects Get a list of created Projects
updateProject PATCH /projects/{project} Update Project

createProject

\WalletPassJP\Model\ResourceResponse createProject($body)

Create new Project

Create new Project record.

Example

<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure HTTP bearer authorization: Bearer
$key = 'YOUR_ACCESS_TOKEN';

$apiInstance = new WalletPassJP\Api\ProjectsApi($key);
$body = new \WalletPassJP\Model\ProjectRequest(); // \WalletPassJP\Model\ProjectRequest |

try {
    $result = $apiInstance->create($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->createProject: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \WalletPassJP\Model\ProjectRequest [optional]

Return type

\WalletPassJP\Model\ResourceResponse

Authorization

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]

deleteProject

deleteProject($project)

Delete Project

Delete Project record.

Example

<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure HTTP bearer authorization: Bearer
$key = 'YOUR_ACCESS_TOKEN';

$apiInstance = new WalletPassJP\Api\ProjectsApi($key);
$project_id = 'project_example'; // string | Project id

try {
    $apiInstance->delete($project_id);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->deleteProject: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project string Project id

Return type

void (empty response body)

Authorization

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]

getProjectByID

\WalletPassJP\Model\ResourceResponse getProjectByID($project)

Get Project record.

Example

<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure HTTP bearer authorization: Bearer
$key = 'YOUR_ACCESS_TOKEN';

$apiInstance = new WalletPassJP\Api\ProjectsApi($key);
$project_id = 'project_example'; // string | Project id

try {
    $result = $apiInstance->show($project_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->getProjectByID: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project string Project

Return type

\WalletPassJP\Model\ResourceResponse

Authorization

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]

listProjects

\WalletPassJP\Model\CollectionResponse listProjects($limit, $page, $tags)

Get a list of created Projects

Get all Projects records.

Example

<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure HTTP bearer authorization: Bearer
$key = 'YOUR_ACCESS_TOKEN';

$apiInstance = new WalletPassJP\Api\ProjectsApi($key);
$limit = 15; // int | Records imit
$page = 1; // int | Page number
$tags = ['tags_example']; // string[] | Filter by tags

try {
    $result = $apiInstance->list($limit, $page, $tags);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->list: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
limit int Records imit [optional] [default to 15]
page int Page number [optional] [default to 1]
tags string[] Filter by tags [optional]

Return type

\WalletPassJP\Model\CollectionResponse

Authorization

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]

updateProject

updateProject($project, $body)

Update Project

Update Project record.

Example

<?php
require_once __DIR__ . '/vendor/autoload.php';
// Configure HTTP bearer authorization: Bearer
$key = 'YOUR_ACCESS_TOKEN';

$apiInstance = new WalletPassJP\Api\ProjectsApi($key);
$project_id = 'project_example'; // string | Project id
$body = new \WalletPassJP\Model\ProjectRequest(); // \WalletPassJP\Model\ProjectRequest |

try {
    $apiInstance->update($project_id, $body);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->updateProject: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project string Project
body \WalletPassJP\Model\ProjectRequest [optional]

Return type

void (empty response body)

Authorization

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]