Java API build problems

Answered

Comments

2 comments

  • Casper Fabricius

    If you use Eclipse, try following these steps:

    1. Create a new Maven project (make sure you have Maven integration installed)
    2. Double-click pom.xml and go to the Dependencies tab
    3. Click the Add button in the Dependencies list to the left
    4. Enter "podio" in the search field and select the newest version of com.podio.api (currently 0.7.3)
    5. Click OK and rebuild the project

    Here's a sample on how to authenticate with username/password auth (this auth method is only recommended for testing, not for production use):

    String clientId = "[your client id]";

    String clientSecret = "[your client secret]";

    String username = "[your login email]";

    String password = "[your login password]";
    ResourceFactory resourceFactory = new ResourceFactory(

    new OAuthClientCredentials(clientId, clientSecret),

    new OAuthUsernameCredentials(username, password));
    APIFactory apiFactory = new APIFactory(resourceFactory);

    ItemAPI itemAPI = apiFactory.getAPI(ItemAPI.class);

    0
    Comment actions Permalink
  • Bryan Bible

    Thanks for the pointers!!

    So after I follow these instructions and get to step 5, what is the proper way to rebuild the project? If I select the project in Eclipse and right click ->Run As->Maven Build, then I am presented with a form which wants me to enter 'Goals' or 'Profiles'. What is the best option to enter here to get a jar file that contains the API and the dependencies?

     

    Thanks

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk