Code Monkey home page Code Monkey logo

graduation-project-ya-api-content's Introduction

graduation-project-ya-api-content

Информация о фильмах, жанрах и людях, участвовавших в создании произведения

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

  • API version: 1.0.0
  • Package version: 1.0.4
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

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_USER_ID/GIT_REPO_ID.git

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

Then import the package:

import content_api 

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 content_api

Getting Started

Please follow the installation procedure and then run the following:

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

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
film_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Кинопроизведение
    api_response = api_instance.film_details_content_api_api_v1_film_film_id_get(film_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->film_details_content_api_api_v1_film_film_id_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
film_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Кинопроизведение
    api_response = api_instance.film_details_content_api_api_v1_film_film_id_get_0(film_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->film_details_content_api_api_v1_film_film_id_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
filter_genre = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | filter on genre (optional)
sort = 'sort_example' # str | sort on filed (order: \"-\" before filed name is desc) (optional)
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Кинопроизведения
    api_response = api_instance.films_list_content_api_api_v1_film_get(filter_genre=filter_genre, sort=sort, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->films_list_content_api_api_v1_film_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
filter_genre = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | filter on genre (optional)
sort = 'sort_example' # str | sort on filed (order: \"-\" before filed name is desc) (optional)
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Кинопроизведения
    api_response = api_instance.films_list_content_api_api_v1_film_get_0(filter_genre=filter_genre, sort=sort, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->films_list_content_api_api_v1_film_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
genre_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Жанр
    api_response = api_instance.genres_content_api_api_v1_genre_genre_id_get(genre_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->genres_content_api_api_v1_genre_genre_id_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
genre_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Жанр
    api_response = api_instance.genres_content_api_api_v1_genre_genre_id_get_0(genre_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->genres_content_api_api_v1_genre_genre_id_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
sort = 'sort_example' # str | sort on filed (order: \"-\" before filed name is desc) (optional)
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Жанры кинопроизведений
    api_response = api_instance.genres_content_api_api_v1_genre_get(sort=sort, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->genres_content_api_api_v1_genre_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
sort = 'sort_example' # str | sort on filed (order: \"-\" before filed name is desc) (optional)
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Жанры кинопроизведений
    api_response = api_instance.genres_content_api_api_v1_genre_get_0(sort=sort, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->genres_content_api_api_v1_genre_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
person_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Детальное описание человека
    api_response = api_instance.get_person_content_api_api_v1_person_person_id_get(person_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->get_person_content_api_api_v1_person_person_id_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
person_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Детальное описание человека
    api_response = api_instance.get_person_content_api_api_v1_person_person_id_get_0(person_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->get_person_content_api_api_v1_person_person_id_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
person_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Фильмы человека
    api_response = api_instance.get_person_film_content_api_api_v1_person_person_id_film_get(person_id, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->get_person_film_content_api_api_v1_person_person_id_film_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
person_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Фильмы человека
    api_response = api_instance.get_person_film_content_api_api_v1_person_person_id_film_get_0(person_id, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->get_person_film_content_api_api_v1_person_person_id_film_get_0: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
query = 'query_example' # str | search text_query
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Поиск кинопроизведений
    api_response = api_instance.search_films_content_api_api_v1_film_search_get(query, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->search_films_content_api_api_v1_film_search_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
query = 'query_example' # str | search text_query
page_size = 50 # int | Page size (optional) (default to 50)
page_number = 1 # int | Page number (optional) (default to 1)

try:
    # Поиск по людям
    api_response = api_instance.search_persons_content_api_api_v1_person_search_get(query, page_size=page_size, page_number=page_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->search_persons_content_api_api_v1_person_search_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
film_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Кинопроизведение
    api_response = api_instance.short_film_detail_content_api_api_v1_film_short_film_id_get(film_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->short_film_detail_content_api_api_v1_film_short_film_id_get: %s\n" % e)

# create an instance of the API class
api_instance = content_api.DefaultApi(content_api.ApiClient(configuration))
film_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # str | 

try:
    # Кинопроизведение
    api_response = api_instance.short_film_detail_content_api_api_v1_film_short_film_id_get_0(film_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->short_film_detail_content_api_api_v1_film_short_film_id_get_0: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
DefaultApi film_details_content_api_api_v1_film_film_id_get GET /content_api/api/v1/film/{film_id}/ Кинопроизведение
DefaultApi film_details_content_api_api_v1_film_film_id_get_0 GET /content_api/api/v1/film/{film_id}/ Кинопроизведение
DefaultApi films_list_content_api_api_v1_film_get GET /content_api/api/v1/film/ Кинопроизведения
DefaultApi films_list_content_api_api_v1_film_get_0 GET /content_api/api/v1/film/ Кинопроизведения
DefaultApi genres_content_api_api_v1_genre_genre_id_get GET /content_api/api/v1/genre/{genre_id} Жанр
DefaultApi genres_content_api_api_v1_genre_genre_id_get_0 GET /content_api/api/v1/genre/{genre_id} Жанр
DefaultApi genres_content_api_api_v1_genre_get GET /content_api/api/v1/genre Жанры кинопроизведений
DefaultApi genres_content_api_api_v1_genre_get_0 GET /content_api/api/v1/genre Жанры кинопроизведений
DefaultApi get_person_content_api_api_v1_person_person_id_get GET /content_api/api/v1/person/{person_id}/ Детальное описание человека
DefaultApi get_person_content_api_api_v1_person_person_id_get_0 GET /content_api/api/v1/person/{person_id}/ Детальное описание человека
DefaultApi get_person_film_content_api_api_v1_person_person_id_film_get GET /content_api/api/v1/person/{person_id}/film/ Фильмы человека
DefaultApi get_person_film_content_api_api_v1_person_person_id_film_get_0 GET /content_api/api/v1/person/{person_id}/film/ Фильмы человека
DefaultApi search_films_content_api_api_v1_film_search_get GET /content_api/api/v1/film/search/ Поиск кинопроизведений
DefaultApi search_persons_content_api_api_v1_person_search_get GET /content_api/api/v1/person/search/ Поиск по людям
DefaultApi short_film_detail_content_api_api_v1_film_short_film_id_get GET /content_api/api/v1/film/short/{film_id}/ Кинопроизведение
DefaultApi short_film_detail_content_api_api_v1_film_short_film_id_get_0 GET /content_api/api/v1/film/short/{film_id}/ Кинопроизведение
_Api search_films_content_api_api_v1_film_search_get GET /content_api/api/v1/film/search/ Поиск кинопроизведений
_Api search_persons_content_api_api_v1_person_search_get GET /content_api/api/v1/person/search/ Поиск по людям
HealthApi health_check_content_api_api_health_get GET /content_api/api/health/ Health Check

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

graduation-project-ya-api-content's People

Contributors

alexandernimo avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.