Skip to content

CNES/pyDoiApiClient

Repository files navigation

swagger-client

A Digital Object Identifier (DOI) is an alphanumeric string assigned to uniquely identify an object. It is tied to a metadata description of the object as well as to a digital location, such as a URL, where all the details about the object are accessible. This documentation provides an API to query the DOI-server.

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.PythonClientCodegen For more information, please visit http://cnes.fr

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com//.git

(you may need to run pip with root permission: sudo pip install git+https://github.com//.git)

Then import the package:

import swagger_client 

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: basicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = swagger_client.AdministrationApi(swagger_client.ApiClient(configuration))

try:
    api_response = api_instance.create_token()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdministrationApi->create_token: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AdministrationApi create_token POST /admin/token
DOICitationFormatterApi get_citation GET /citation/format
DOICitationFormatterApi get_citations_language GET /citation/language
DOICitationFormatterApi get_citations_style GET /citation/style
DataCiteMetadataStoreMDSAPIApi cancel_doi_project DELETE /mds/metadata/{prefix}/{project}/{doi_name}
DataCiteMetadataStoreMDSAPIApi get_all_doi_metadata GET /mds/metadata/{prefix}/{project}/{doi_name}
DataCiteMetadataStoreMDSAPIApi get_doi_media GET /mds/media/{prefix}/{project}/{doi_name}
DataCiteMetadataStoreMDSAPIApi get_landing_page_url GET /mds/dois/{prefix}/{project}/{doi_name}
DataCiteMetadataStoreMDSAPIApi post_doi_metadata POST /mds/metadata
DataCiteMetadataStoreMDSAPIApi post_landing_page POST /mds/dois
DataCiteMetadataStoreMDSAPIApi post_media POST /mds/media/{prefix}/{project}/{doi_name}

Documentation For Models

Documentation For Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

basicAuth

  • Type: HTTP basic authentication

Author

jean-christophe.malapert@cnes.fr