API of kinopoisk (cinema-service) for Emacs Lisp
NOTE: MELPA
haven't emacs-kinopoisk
yet
If you need to use emacs-kinopoisk
in other repo, then:
- Clone to the root directory of your project
cd /path/to/root/of/your/project
# Via `https`
git clone https://github.com/semenInRussia/emacs-kinopoisk.git
- Add the followed require-statement to your source:
(require 'kinopoisk)
If you need to the usage of helm-kinopoisk
, then:
- Clone the repo to the folder with other installed projects:
# I save installed projects in ~/.emacs.d/lisp/ , change to your folder
cd ~/.emacs.d/lisp/
# Via `https`
git clone https://github.com/semenInRussia/emacs-kinopoisk.git
-
If you use use-package, the use followed code:
(use-package helm-kinopoisk ;; Change the next line if you use a other folder for save the ;; Elisp source :load-path "~/.emacs.d/lisp/emacs-kinopoisk")
## Usage
### Get API Key
[Kinopoisk API](https://kinopoiskapiunofficial.tech) give free 500
requests, this is enough, when API Key used by one user, but if 2+
users use API, then 500 requests too little, so please create account
on [Kinopoisk API](https://kinopoiskapiunofficial.tech), take API-Key,
and do followed code:
```elisp
(setq kinopoisk-api-key "<YOUR API KEY>")
Main object of these Elisp package is kinopoisk-film
, for find a
film from id, use the followed code:
;; 301 is ID of film `The Matrix' on Kinopooisk
(kinopoisk-film-from-id 301)
If you need to get a info from a kinopoisk-film
, then use the
followed functions:
kinopoisk-film-year
(the type is string)kinopoisk-film-countries
(the type is list of string, list of countries in russian language)kinopoisk-film-rating
(the type is number, rating from 0 to 100)kinopoisk-film-id
(the type is number)kinopoisk-film-name
(the type is string, the russian name)kinopoisk-film-original-name
(the type is string)kinopoisk-film-web-url
(the type is string)kinopoisk-film-poster-url
(the type is string)kinopoisk-film-length
(the type is number, the amount of minutes in film)kinopoisk-film-slogan
(the type is string)kinopoisk-film-description
(the type is string)kinopoisk-film-short-description
(the type is string)kinopoisk-film-rating-age-limits
(the type is string, for example: "age16")kinopoisk-film-is-serial-p
(the type is boolean,t
when film is serial)
If you need to open web page of film in web browser, use function
kinopoisk-film-open-in-web
If you need to see trailers of a film use function
kinopoisk-film-videos
, this function return list of
kinopoisk-film-video
objects, each film video has attributes name
,
url
and site
, so kinopoisk-film-video
has followed methods:
kinopoisk-film-video-url
kinopoisk-film-video-site
kinopoisk-film-video-name
If you need to open film video use function
kinopoisk-film-video-open-in-web
If you need to see film's top use function kinopoisk-get-films-top
,
the first argument is type of top. It is one of followed symbols:
best
. Defaultpopular
await
The second argument is page (number), kinopoisk-get-films-top
return
20 films, so if you need to take other 20 films use followed code:
;; `nil' mean choose default value
(kinopoisk-get-films-top nil 2)
All functions which view films has followed actions:
- Copy URL of Web Page on Kinopoisk
- Open Web Page on Kinopoisk
- See Videos about Film
helm-kinopoisk-search-films
View list of similar to query films
helm-kinopoisk-see-films-top
ask type of top (see Films
Top), then view top of films.
Yes, please do! See CONTRIBUTING for guidelines.
See COPYING. Copyright (c) 2022 Semen Khramtsov.