Git Product home page Git Product logo

image_api's Introduction

# Usage RAILS::API ### USER: #### Create:

“‘ user = [email protected] user = 1q2w3e4r5t6y7u user = 1q2w3e4r5t6y7u “` #### Update

“‘ user = [email protected] user = 123qwe123qwe

HTTP_API_TOKEN

‘Token xxxxxxxxxxxxxxx’

“‘ #### Delete

“‘

HTTP_API_TOKEN

‘Token xxxxxxxxxxxxxxx’

“‘ #### Autorization

“‘ session = [email protected] session = 123qwe123qwe “` After Autorization you get unique api_token: “` {

"_id": {
    "$oid": "5713b48c8f1ddad88a53c4d7"
},
"auth_token": "MtH_mwVKTyvoxJLFWaEW",
"email": "[email protected]"

} “‘ You will need auth_token for upload and resize images

#### Unauthorization

“‘ session = [email protected] session = 123qwe123qwe “` #### List of all images belongs to current user:

“‘

API_TOKEN

‘Token MtH_mwVKTyvoxJLFWaEW’

“‘

  • Response example:

“‘ {

"galleries": [
    {
        "_id": {
            "$oid": "5713d1018f1ddae10d3bc076"
        },
        "file": {
            "url": "/uploads/123123.png"
        },
        "format": null,
        "gallery_id": {
            "$oid": "5713d0e08f1ddae10d3bc075"
        },
        "heigth": null,
        "width": null
    }
]

} “‘ #### Resize new image

“‘

API_TOKEN

‘Token MtH_mwVKTyvoxJLFWaEW’

“‘

  • params:

“‘ gallery = ’123x234’ gallery = file.png/jpeg/jpg

“‘

  • response example:

“‘ {

"status": "Success",
"message": "Your new Image was successfully uploaded with 123x235",
"url": "/uploads/mini_magick20160418-57613-17uuygi.png",
"width": 123,
"height": 58

} “‘ #### Resize old image For this operation you need to have at list one image you want to resize

“‘

API_TOKEN

‘Token MtH_mwVKTyvoxJLFWaEW’

“‘

  • params:

“‘ gallery = ’123x234’ gallery = file.png “‘ If image exists, it should be resized: “` {

"status": "Success",
"message": "Your old Image was successfully uploaded with 123x345"

} “‘ If no image: “` {

"status": "errors",
"message": "No file"

} “‘

image_api's People

Contributors

alerkasun avatar

Watchers

James Cloos 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.