Coder Social home page Coder Social logo

yam-python's People

Contributors

arundhaj avatar brianly avatar dbrattli avatar fedecorigliano avatar georgebrock avatar hermansc avatar jaguasch avatar kilo59 avatar phracturedblue avatar simonboeck avatar tarunbehal avatar tonybaloney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yam-python's Issues

Release a new version on PyPi

Hello there. This module has been updated here on GitHub to support Python 3, but the version of PyPi is months out of date. Could you release a new version of the module on PyPi so you can easily install the module via PIP, without having to reference a GitHub URL?

Remote HEAD refers to nonexistent ref, unable to checkout

https://help.github.com/articles/error-remote-head-refers-to-nonexistent-ref-unable-to-checkout/

$ git clone http://github.com/yammer/yam-python.git
Cloning into 'yam-python'...
remote: Counting objects: 679, done.
remote: Total 679 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (679/679), 179.67 KiB | 23.00 KiB/s, done.
Resolving deltas: 100% (317/317), done.
Checking connectivity... done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.

Error in importing yampy

When trying to import yampy in a python script I get an internal import error from Yampy.

Here is the error:

Traceback (most recent call last):
 File "C:\Users\raffertd\Desktop\Gamification\yammer_parser.py", line 1, in <mo
dule>
    import yampy
  File "C:\Python34\lib\site-packages\yampy\__init__.py", line 22, in <module>
    from authenticator import Authenticator
 ImportError: No module named 'authenticator'

This occurs when simply trying to import yampy

import yampy

UnauthorizedError: Unauthorized

Following Quickstart guide, I can get the access_token use authenticator. But when I Try to access data from yammer Use
yammer = yampy.Yammer(access_token=access_token)
yammer.messages.all()
the request always raise Unauthorized exception.

Python 2.6 install on Windows is broken

Installing 'yampy'
Downloading/unpacking yampy
Downloading yampy-1.0.tar.gz
Running setup.py egg_info for package yampy
Traceback (most recent call last):
File "", line 16, in
File "c:\users\brianly\appdata\local\temp\pip_build_brianly\yampy\setup.py", line 47, in
test_suite="nose.collector",
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "", line 14, in replacement_run
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\egg_info.py", line 259, in find_sources
mm.run()
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\egg_info.py", line 327, in run
self.read_template()
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\sdist.py", line 228, in __read_template_hack
_sdist.read_template(self)
File "C:\Python26\lib\distutils\command\sdist.py", line 336, in read_template
self.filelist.process_template_line(line)
File "C:\Python26\lib\distutils\filelist.py", line 129, in process_template_line
(action, patterns, dir, dir_pattern) = self._parse_template_line(line)
File "C:\Python26\lib\distutils\filelist.py", line 104, in _parse_template_line
dir = convert_path(words[1])
File "C:\Python26\lib\distutils\util.py", line 201, in convert_path
raise ValueError, "path '%s' cannot end with '/'" % pathname
ValueError: path 'yampy/apis/' cannot end with '/'
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info\yampy.egg-info
writing requirements to pip-egg-info\yampy.egg-info\requires.txt
writing pip-egg-info\yampy.egg-info\PKG-INFO
writing top-level names to pip-egg-info\yampy.egg-info\top_level.txt
writing dependency_links to pip-egg-info\yampy.egg-info\dependency_links.txt
writing manifest file 'pip-egg-info\yampy.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info\yampy.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
Traceback (most recent call last):
File "", line 16, in
File "c:\users\brianly\appdata\local\temp\pip_build_brianly\yampy\setup.py", line 47, in
test_suite="nose.collector",
File "C:\Python26\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "C:\Python26\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "", line 14, in replacement_run
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\egg_info.py", line 259, in find_sources
mm.run()
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\egg_info.py", line 327, in run
self.read_template()
File "C:\Python26\lib\site-packages\distribute-0.6.45-py2.6.egg\setuptools\command\sdist.py", line 228, in __read_template_hack
_sdist.read_template(self)
File "C:\Python26\lib\distutils\command\sdist.py", line 336, in read_template
self.filelist.process_template_line(line)
File "C:\Python26\lib\distutils\filelist.py", line 129, in process_template_line
(action, patterns, dir, dir_pattern) = self._parse_template_line(line)
File "C:\Python26\lib\distutils\filelist.py", line 104, in _parse_template_line
dir = convert_path(words[1])
File "C:\Python26\lib\distutils\util.py", line 201, in convert_path
raise ValueError, "path '%s' cannot end with '/'" % pathname

ValueError: path 'yampy/apis/' cannot end with '/'

Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\brianly\appdata\local\temp\pip_build_brianly\yampy
Storing complete log in C:\Users\brianly\pip\pip.log
'yampy' failed to install. Exit code: 1

MessagesAPI documentation - doesn't explain it only returns 20 messages max

It is expected that the messages.all() function should return ALL messages in a network, not just 20. Thus, getting all posts on a network is very convoluted, as you have to get them 20 at a time. You also cannot get all the responses to posts either, you have to use the messages.in_thread() function per thread, which, in large networks, can be a very large task and time consuming.

fetch_access_data does a get instead of post which results in a HTTP 400 Bad Request

When trying to receive an access_token from the code received via response_url. The yampy module responds with HTTP 400 Bad Request

How to reproduce

import yampy
code = request.GET['code']
authenticator = yampy.Authenticator(
    client_id='MY_KEY',
    client_secret='MY_SECRET'
)
access_token = authenticator.fetch_access_token(code)

How to fix

Use post instead of get
https://developer.yammer.com/docs/oauth-2

def fetch_access_data(self, code):
    [...]
    return client.post(
        path="/access_token",
        client_id=self._client_id,
        client_secret=self._client_secret,
        code=code,
    )

Appending ".json" to all custom calls doesn't always work

There is a problem with this line:

return self._base_url + path + ".json"

Most of the Yammer /api/v1/ calls will happily accept a .json suffix, but some will not. The first example I've found is /api/v1/autocomplete/ranked.

My suggested fix would be to send a Content-Type: application/json as a request header, rather than blindly appending .json.

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.