Coder Social home page Coder Social logo

pyak's Introduction

#pyak

Pyak is a simple python wrapper for Yik Yak's API.

##Installation

No installation is needed. Simply download pyak.py and place it in the same director as your program, then import pyak in your program.

##Basic Usage

####Creating a Yakker

The Yakker class takes a single optional parameter, a user ID. User IDs are the unique identifier used by Yik-Yak to track individual users. The following will initialize a yakker with the given user ID:

yakker = pyak.Yakker(user_id)

If no argument is given, a new yakker will automatically be registered and assigned an ID by the server. You can easily fetch the assigned ID for storage and re-use through Yakker's id property:

yakker = pyak.Yakker()
print "New yakker registered with ID: %s" % yakker.id

####Setting Location

You must set a location before most operations:

location = pyak.Location(latitude, longitude)
yakker.update_location(location)

Where latitude and longitude are strings represetning the location on Earth.

####Fetching Yaks

The get_yaks() function will fetch a list of the most recent yaks in your area:

yaks = yakker.get_yaks()
for yak in yaks:
  print yak.message

##Complete Documentation

A more complete documentation is coming soon.

pyak'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.