Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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 [api@skroutz.gr](mailto: api@skroutz.gr).

LICENSE

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

About

Official Elixir client for Skroutz API v3 https://developer.skroutz.gr

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.