/blueprint_php

Swagger-generated PHP API wrapper for Blueprint

Primary LanguagePHP

SwaggerClient-php

This is the API documentation for Blueprint, a primitive for institutional structure and time periods

This PHP package is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build date: 2017-05-02T12:05:45.191Z
  • Build package: class io.swagger.codegen.languages.PhpClientCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID.git"
    }
  ],
  "require": {
    "YOUR_GIT_USR_ID/YOUR_GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/SwaggerClient-php/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

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

// Configure OAuth2 access token for authorization: oauth2
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\AssetTypeConfigsApi();
$namespace = "namespace_example"; // string | identifier namespacing the blueprint. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.
$asset_type = "asset_type_example"; // string | subtype of Asset, e.g. 'textbooks', 'digitisations', etc.

try {
    $result = $api_instance->get($namespace, $asset_type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetTypeConfigsApi->get: ', $e->getMessage(), "\n";
}

?>

Documentation for API Endpoints

All URIs are relative to http://localhost:10010/1

Class Method HTTP request Description
AssetTypeConfigsApi get GET /{namespace}/assets/{assetType}/templates
AssetTypeTemplatesApi add POST /{namespace}/assets/{assetType}/templates
AssetTypeTemplatesApi delete DELETE /{namespace}/assets/{assetType}/templates
AssetTypeTemplatesApi put PUT /{namespace}/assets/{assetType}/templates
AssetsApi addAssetToNode PUT /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId}
AssetsApi deleteAsset DELETE /{namespace}/assets/{assetType}/{assetId}
AssetsApi deleteAssets DELETE /{namespace}/assets Delete assets
AssetsApi getAsset GET /{namespace}/assets/{assetType}/{assetId}
AssetsApi getAssetsInNode GET /{namespace}/nodes/{type}/{id}/assets
AssetsApi removeAssetFromNode DELETE /{namespace}/nodes/{type}/{id}/assets/{assetType}/{assetId}
AssetsApi replaceAsset PUT /{namespace}/assets/{assetType}/{assetId} Replaces the Asset with the data sent in the body
AssetsApi searchAssets GET /{namespace}/assets Search assets
HierarchyApi addNode POST /{namespaceIncGlobal}/nodes
HierarchyApi bulkUpload POST /{namespace}/nodes.csv
HierarchyApi deleteNode DELETE /{namespace}/nodes/{type}/{id}
HierarchyApi deleteNodes DELETE /{namespaceIncGlobal}/nodes Delete nodes
HierarchyApi exportHierarchy GET /{namespace}/nodes.csv
HierarchyApi getAncestors GET /{namespace}/nodes/{type}/{id}/ancestors Get ancestor nodes
HierarchyApi getChildren GET /{namespace}/nodes/{type}/{id}/children Get child nodes
HierarchyApi getDescendants GET /{namespace}/nodes/{type}/{id}/descendants Get descendant nodes
HierarchyApi getNode GET /{namespace}/nodes/{type}/{id}
HierarchyApi getParents GET /{namespace}/nodes/{type}/{id}/parents Get parent nodes
HierarchyApi replaceNode PUT /{namespace}/nodes/{type}/{id}
HierarchyApi searchNodes GET /{namespaceIncGlobal}/nodes Search nodes
HierarchyApi updateNode PATCH /{namespace}/nodes/{type}/{id}
IntegrationsApi addIntegration POST /{namespace}/integrations
IntegrationsApi deleteIntegration DELETE /{namespace}/integrations/{integrationType}/{integrationId}
IntegrationsApi getIntegration GET /{namespace}/integrations/{integrationType}/{integrationId}
IntegrationsApi namespaceIntegrationsLti1IntegrationIdAssetsAssetTypeAssetIdPost POST /{namespace}/integrations/lti1/{integrationId}/assets/{assetType}/{assetId}
IntegrationsApi replaceIntegration PUT /{namespace}/integrations/{integrationType}/{integrationId}
LTIApi namespaceIntegrationsLti1IntegrationIdAssetsAssetTypeAssetIdPost POST /{namespace}/integrations/lti1/{integrationId}/assets/{assetType}/{assetId}
SecurityApi getPublicCertificate GET /keys/public

Documentation For Models

Documentation For Authorization

oauth2

  • Type: OAuth
  • Flow: application
  • Authorizatoin URL:
  • Scopes:
  • su: Talis super user
  • su@{namespace}: Super user for a specific blueprint

Author