Coder Social home page Coder Social logo

zanox's Introduction

zanox

by Krispin Schulz

The zanox gem is the ruby way to use the zanox API.
It is a wrapper for the zanox Publisher web services and you can use resources like
models in ActiveRecord.

Getting started

  • Install the gem
    gem install zanox
  • Learn its usage with the examples below
  • Create shiny ruby apps with it

Features

Supported zanox API methods:

zanox API method the ruby way
getAdspaces Zanox::Adspace.find(:all)
getAdspace Zanox::Adspace.find(‘adspace id here’)
getProgram Zanox::Program.find(‘program id here’)
getProgramsByAdspace Zanox::Program.find(:adspaceId => ‘adspace id here’)
searchPrograms Zanox::Program.find(‘amazon’, :region=>’de’)
getProduct Zanox::Product.find(‘zupid of the product here’)
getProducts Zanox::Product.find(:programId=>’program id is required here’, :adspaceId=>’adspace id here’)
searchProducts Zanox::Product.find(‘ipad’, :region=>’de’, :programId=>’a program id here’)
getSales Zanox::Sale.find(:date=>’2010-03-02T00:00:00’, :dateType=>’trackingDate’)

Examples


    require 'rubygems'
    require 'zanox'
    
    # fill in your credentials
    Zanox::API::Session.connect_id = 'your connect id'
    Zanox::API::Session.secret_key = 'your secret key'

    # request products as easy as hell
    Zanox::Product.find('ipod').each do |product|
      puts product.id + " : " + product.name
    end

    # request a product by its zupid
    Zanox::Product.find('b84145a6c81a455c99a90194db15aed3').each do |product|
      puts product.id + " : " + product.name
    end

    # get all your zanox adspaces
    Zanox::Adspace.find(:all).each do |adspace|
      puts adspace.id + " : " + adspace.name
    end

For more code snippets look at the files in the examples dir.

License

Published under a Creative Commons license.

zanox's People

Contributors

kr1sp1n avatar tobsch avatar jsaedtler avatar

Stargazers

Ben avatar

Watchers

Ben 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.