Created
March 4, 2013 06:21
-
-
Save brianly/5080340 to your computer and use it in GitHub Desktop.
An example showing how to use an Access Token to return messages with YamPy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
ACCESS_TOKEN = '' | |
import json | |
import yampy | |
def pprint(raw_json): | |
print json.dumps(raw_json, sort_keys=True, | |
indent=2, separators=(',', ': ')) | |
def main(): | |
# Getting ready | |
yammer = yampy.Yammer(access_token=ACCESS_TOKEN) | |
# Get all my messages | |
all_messages = yammer.messages.all() | |
# Pretty print the messages | |
pprint(all_messages) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment