Skip to content

OneMusicAPI/client-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAPIClient-php

OneMusicAPI is a low cost music metadata API

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

Requirements

PHP 5.5 and later

Installation & Usage

Composer

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

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/onemusicapi/client-php.git"
    }
  ],
  "require": {
    "onemusicapi/client-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

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



$apiInstance = new OneMusicAPI\Client\Api\ReleaseApi(
    // 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()
);
$user_key = 'user_key_example'; // string | Your API key.
$inc = 'inc_example'; // string | 
$must_inc = 'must_inc_example'; // string | 
$max_result_count = 56; // int | 
$min_certainty = 3.4; // float | 
$min_image_score = 56; // int | 
$min_image_width = 56; // int | 
$min_image_height = 56; // int | 
$max_image_width = 56; // int | 
$max_image_height = 56; // int | 
$title = 'title_example'; // string | The title of the release.
$artist = 'artist_example'; // string | The name of the artist for the release.
$barcode = 'barcode_example'; // string | The barcode for the release.

try {
    $result = $apiInstance->release($user_key, $inc, $must_inc, $max_result_count, $min_certainty, $min_image_score, $min_image_width, $min_image_height, $max_image_width, $max_image_height, $title, $artist, $barcode);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReleaseApi->release: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to http://api.onemusicapi.com

Class Method HTTP request Description
ReleaseApi release GET /20190716/release

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

dan@elstensoftware.com