Giter Site home page Giter Site logo

yandex_client's Introduction

YandexClient

Installation

Add this line to your application's Gemfile:

gem 'yandex_client', '>= 1'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install yandex_client

Disk webdav

https://tech.yandex.ru/disk/doc/dg/reference/put-docpage/

Chainable client:

YandexClient::Dav['your_access_token']
    .put('1.txt', '/a/b/c/1.txt')
    .put(File.open('1.txt', 'rb'), '/path/to/1.txt')
    .put(Tempfile.new.tap { |t| t.write('say ni'); t.rewind }, '/path/to/tmp.txt')
    .delete('/a/b/c/1.txt')
    .mkcol('/a/b/c')
    .propfind('/a/dip.yml', depth: 0)
    .propfind('/a', depth: 1)
    .propfind.to_a

Disk rest api

https://yandex.ru/dev/disk/api/reference/capacity-docpage/ https://yandex.ru/dev/disk/api/reference/content-docpage/

YandexClient::Disk['access_token'].info
YandexClient::Disk['access_token'].download_url('path/to/file')
YandexClient::Disk['access_token'].upload_url('path/to/file', overwrite: false)
YandexClient::Disk['access_token'].move('path/to/file', 'new_path/to/new_file', overwrite: false)

Auth

https://tech.yandex.ru/oauth/doc/dg/reference/refresh-client-docpage/ https://tech.yandex.ru/oauth/doc/dg/reference/auto-code-client-docpage/#auto-code-client__get-token

YandexClient.auth.create_token('9388894')
YandexClient.auth.refresh_token('refresh_token')

Passport

https://tech.yandex.ru/passport/doc/dg/reference/request-docpage/

YandexClient::Passport::Client['access_token'].info

yandex_client's People

Contributors

yamax2 avatar

Stargazers

 avatar

Watchers

 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.