Git Product home page Git Product logo

django-redis-cache's Introduction

Uploadcare Ruby Gem

Simple ruby gem to interact with the Uploadcare API

Example Usage

require 'uploadcare'
pubkey = "d1531fba1b7fd176feaec8d1e7d86650ac549b9644e9279197a8c901243509dc"
pvtkey = "2f769cf086ece700f69fc58fb61e64a7708fee777068dc3f75798ae6166891f1"
file_id = "b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu"
ucare = Uploadcare.new(pubkey, pvtkey)
file = ucare.file(file_id)
file.info # Returns the files info hash
file.keep # Returns the updated info hash

Example Info Hashes

Preclaim Hash:

{
	"upload_date"=>"2011-10-25 02:05:50",
	"last_keep_claim"=>nil,
	"on_s3"=>true,
	"url"=>"http://api.uploadcare.com/api/files/b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu/",
	"file_id"=>"b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu",
	"original_filename"=>"test-image.png",
	"original_file_url"=>nil
}

Postclaim Hash:

{
	"upload_date"=>"2011-10-25 02:05:50",
	"last_keep_claim"=>"2011-10-25 02:19:06",
	"on_s3"=>true,
	"url"=>"http://api.uploadcare.com/api/files/b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu/",
	"file_id"=>"b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu",
	"original_filename"=>"test-image.png",
	"original_file_url"=>"http://s3.amazonaws.com/uploadcare/b6nn9f2d-1aj2-6q87-ofk0-265d8nki0diu/testimage.png"
}

Notes

All data in the examples (pubkey, pvtkey, file_id, example hashses) are intended to show usage and format. These values are randomly generated strings for this example and are therefore not valid. You must use your own public and private key, as well as a valid file id. Since the API is still very limited, thats about the extent of what you can do. Once delete functionallity is added to the API I will update the gem

django-redis-cache's People

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.