Giter Club home page Giter Club logo

skroutz.ex's Introduction

skroutz.ex

Build Status Package Version

A minimalistic Skroutz API client, for Elixir

Installation

To install the package:

  1. Add skroutz to your list of dependencies in mix.exs:
def deps do
  [{:skroutz, "~> version_here"}]
end
  1. Ensure skroutz is started before your application:
def application do
  [applications: [:skroutz]]
end

Documentation

Resources

Usage

Create a client process

# With OAuth2.0 credentials
{:ok, skroutz} = Skroutz.new(%{client_id: "id", client_secret: "secret"})

# With OAuth2.0 credentials, for the Alve flavor
{:ok, alve} = Skroutz.new(%{client_id: "id",
                            client_secret: "secret",
                            flavor: :alve})
# With existing Oauth2.0 access token
{:ok, skroutz} = Skroutz.new("a valid access token")

Search

{:ok, skroutz} = Skroutz.new("a valid token")

skroutz |> Skroutz.Search.search("nexus 6")

Examples

Reminder: You can use Module.module_info(:exports) to get a list of functions available on a module. Then you can use h inside iex to print documentation.

h Skroutz.Category.find

# Prints documentation for the function

Categories

{:ok, skroutz} = Skroutz.new("a valid token")

# Get a specific category
skroutz |> Skroutz.Category.find(40)

Compatibility

The project has been tested to work with elixir version 1.2.

It may inadvertently work (or seem to work) with other versions, however compatibility and support are not guaranteed.

Development

Running the tests

mix test

Console

iex -S mix

OAuth2.0 Credentials

In order for the client to make requests against our API, a valid set of OAuth2.0 credentials provided by us has to be used.

To get yours send an email at [[email protected]](mailto: [email protected]).

LICENSE

Copyright (c) 2016 Dimitris Zorbas, MIT Licence. See LICENSE.txt for further details.

skroutz.ex's People

Contributors

zorbash avatar

Stargazers

STYLIANOS IORDANIS avatar Kostas Bariotis avatar Vinh Quốc Nguyễn avatar Chrisovalantis Kefalidis avatar  avatar Michalis Zabaras avatar

Watchers

George Chatzigeorgiou avatar Christos Trochalakis avatar Vasilis Dimos avatar Stratos Paraskevaidis avatar  avatar Tasos Stathopoulos avatar James Cloos avatar Apollon Oikonomopoulos avatar  avatar

Forkers

stjordanis

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.