How should we improve our client libraries?

Hi everyone,

We are evaluating potential improvements to our API client libraries.

For those of you that have used one of our client libraries:

  1. Which client library do you use (Java, Node.js, PHP, Python, Ruby)?
  2. How could we make them better?
  3. What is challenging or frustrating about using them?
  4. What feature/features of our client libraries do you rely on or use (auto pagination/collection iterators, Asana change warnings, event streams/event polling)?

For those that chose not to use a client library:

  1. Why did you decide not to use them?
  2. What improvements would we need to make in order for you to use a client library?

Thank you for your feedback! It will help us prioritize the improvements you want. We will keep you updated on our progress.

Best,
John

2 Likes

Kindly, where can one download such a client library or SDK?

Thank you.

If you visit the link in John’s post above, that will take you to a page containing links to all of the client libraries.

One tiny frustration has been that the client librairies are behind in terms of roadmap so if you want to use the latest features you have to make a custom call with the dispatcher directly. I would also love for them to include typing (schemas turned into classes).

Thanks!

4 Likes

Hi Bastien, thank you for sharing your feedback. As our API becomes more and more feature-rich, making sure that our client libraries have parity with our API is high on our list of improvements.

We would love to understand your use case with typing (schemas turned into classes). Could you tell us more about this use case and how it improves your workflows?

1 Like

I believe I should not have to create such a file, it should come built-in with the lib.

1 Like

We generated a new JavaScript/Node.js client library using openapi-generator. For example, this (asana-node-openapi-generator) is what we get when we generated a JavaScript/Node client library from OpenAPI Generator.

Feel free to try it out:

  1. Clone the package git clone https://github.com/Asana/asana-node-openapi-generator.git
  2. Install the package locally npm install ./asana-node-openapi-generator
  3. Create a test script file touch test.js
  4. Test out an API call
    Example code for test.js:
const Asana = require('asana');

let defaultClient = Asana.ApiClient.instance;

// Configure Bearer access token for authorization: personalAccessToken
let personalAccessToken = defaultClient.authentications['personalAccessToken'];
personalAccessToken.accessToken = '<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>';

let apiInstance = new Asana.UsersApi();
let userGid = 'me'; // String | A string identifying a user. This can either be the string \"me\", an email, or the gid of a user.
let opts = {
  'optFields': ["gid","resource_type", "name", "email", "workspaces"]
};

apiInstance.getUser(userGid, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + JSON.stringify(data));
  }
});

  1. Run the script node test.js

How does this compare to other client libraries you have used? Is this more intuitive and better practice than what we currently offer? Feel free to try out other endpoints based on the documentation that was generated.

For context this is what making the same call would look like with our current Node.js client library

const asana = require('asana');

const client = asana.Client.create().useAccessToken('<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>');

client.users.getUser('me', {optFields: ["gid","resource_type", "name", "email", "workspaces"]})
    .then((result) => {
        console.log(result);
    });

@Bastien I do believe this adds typing to the client library. For example, this is the TaskBase class that was generated.

3 Likes

Hi everyone,

Just wanted to follow up in this thread with the announcement of our preview Node.js and Python client libraries:

We are looking for feedback so that we can iterate. Please leave your feedback in the above forum thread or through our developer document feedback form.

1 Like