Git Product home page Git Product logo

filepicker_client's Introduction

Filepicker Client

This library provides a basic interface to the REST API for https://www.inkfilepicker.com/ (see REST API Documentation).

Installation

In Gemfile:

gem 'filepicker_client', git: 'git://github.com/infowrap/filepicker_client.git'

Usage

The FilepickerClient class is used to manage calls to the REST API. You may create a new client object with your Filepicker API key and secret.

require 'filepicker_client'

FPAPIKEY=YOUR_API_KEY_HERE
FPAPISECRET=YOUR_API_SECRET_HERE

fp_client = FilepickerClient.new FPAPIKEY, FPAPISECRET

Client Methods

  • sign - Generate signatures and policies for various Filepicker operations using your key and secret
  • store - Store a file under the specified path through Filepicker
  • store_url - Store a file accessible at a URL under the specified path through Filepicker
  • stat - Get size and MIME type information about a file
  • read - Get a file's content
  • write - Overwrite an existing file with a new one
  • write_url - Overwrite an existing file with a file accessible at a URL
  • remove - Delete a file from Filepicker

FilepickerClientFile

The client's 'store' method will produce file objects. These are linked to the client object and provide a simple means of making further calls on that file.

  • stat
  • read
  • write
  • write_url
  • remove

Testing

Since this library involves operations against the Filepicker service, in order to run the tests, valid API key and secret environment variables must be set. This will allow the test to connect to Filepicker using your credentials and work with files in your storage. Please look over the test code to ensure you are comfortable with it running against your Filepicker account.

Currently each run of the tests will only store two files under the "test" path and attempt to remove them when finished.

rake test FPAPIKEY=YOUR_API_KEY_HERE FPAPISECRET=YOUR_API_SECRET_HERE

filepicker_client's People

Contributors

adafairweather avatar lukemelia avatar r38y 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.