Giter Club home page Giter Club logo

asana's People

Contributors

alexlovelltroy avatar angusb avatar bravely avatar codito avatar jaredlwong avatar kevinslin avatar michellai avatar mthaddon avatar nmercer avatar pandemicsyn avatar talha131 avatar ukolka avatar urth 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  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

Watchers

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

asana's Issues

Exceeded 30 redirects App Engine

Hi. I am trynig to run this on app engine. It works fine when I run it locally on my compture, but once on app engine I am getting the following error:

raise TooManyRedirects('Exceeded %s redirects.' % self.max_redirects)

TooManyRedirects: Exceeded 30 redirects.

I just placed the source in the file root. Everything works up until actually making the call. I can initialize the elements and what not, just not make the final call.

.text and .content

On lines 84-89 of asana.py, there is an explicit test for the existence of attribute .text and .content.

But the handlers for POST and PUT don't have these tests.

For POST

For PUT

Those handlers will raise the exception when using older versions of the requests package. They should probably have the same tests as lines 84-89.

list_tasks - error

First off, love what you guys have done! Its great!

When I run list_tasks. I receive an error, is this a unicode related error?

"Received non 2xx or 404 status code on call"

How can I trouble shoot this error?
Thanks,

More about the error.

-> Calling: https://app.asana.com/api/1.0/workspaces
64****_76
-> Calling: https://app.asana.com/api/1.0/tasks?workspace=7072**_**049&assignee=d*****@gmail.com&include_archived=false
-> Got: 400
-> html>
head>
title>Error/title>script>FILE="(none)";var config = {
"CLUSTER": "prod",
"PRETTY_JS_CODEGEN": false,
"ENABLED_FEATURES": ""
};/script>link rel="shortcut icon" href="/-/static/luna/browser/images/favicon.ico" />

/head>
body>
h3>Error/h3>pre>No route found/pre>
/body>
/html>
Traceback (most recent call last):
File "C:\Users\Daniel**\getAllTasks.py", line 16, in module>
getAllTasks()
File "C:\Users\Daniel**
\getAllTasks.py", line 9, in getAllTasks
taskList = asa.list_tasks(7072***1049, "d**@gmail.com")
File "C:\Users\Daniel
_\asana.py", line 181, in list_tasks
return self.asana(target)
File "C:\Users\Daniel
\asana.py", line 86, in _asana
if (self.handle_exception(r) > 0):
File "C:\Users\Daniel
*\asana.py", line 53, in handle_exception
raise AsanaException('Received non 2xx or 404 status code on call')
asana.AsanaException: Received non 2xx or 404 status code on call
[Finished in 3.5s]

Syntax error?

from asana import asana
File "H:\Scripts\Asana Projects Overview\asana\asana.py", line 47
print "-> Got: %s" % r.status_code
^
SyntaxError: invalid syntax
[Finished in 0.3s with exit code 1]

create_task requires an assignee

This is the culprit:
payload = {'assignee': assignee or 'me', 'name': name,

That makes it impossible to create a task w/o an assignee, which is a common case

Missing return after retry

The last line of _asana() should include a return statement. Currently, if we retry, the function returns None instead of the data we want. This occurs in several other places.

_ok_status returning None

Hi. I'm using python 2.7. Looks like sometimes in _ok_status() the status_code variable is being passed in as type long, and it ends up returning None. This was happening to me when testing locally and calling the list_workspaces() function. Right now I'm just forcing status_code to be an int as a workaround.

unittests

Could use some unitttests. Should be pretty straight forward with a little love from python-mock and MagicMock().

Make assignee optional in list_tasks

get_project_tasks does not return full records for tasks (strangely get_subtasks does). This mirrors the Asana API. Of course I could issue a get_task for each tasks, but that is slow when querying many tasks.

If, instead, one wants to get all tasks in 1 go and filter for project in python code one would use list_tasks. Unfortunately it requires a value for assignee, which is not desired.

So please make assignee an optional argument. I think the Asana API allows for this.

TIA

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.