Java API

Answered

Comments

5 comments

  • Christian Holm

    Hi Jeroen

    The Java API client uses Maven to manage dependencies. It is by far the easiest to also use Maven for your project, so all the dependencies are handled automatically. 

    You can f.ex. see the Twitter sample here: https://github.com/podio/sample-twitter

    You can use pom.xml from there as a starting point. It also includes the maven-shade-plugin, which makes it simple to package your jar including all dependencies. It will also generate a manifest for you with the main-class entry, so you can simply run the resulting jar.

    Christian

    0
    Comment actions Permalink
  • Jeroen Tip

    The documentation of the java api is pore and not in line withe the neweste version.

    However I hav managed to let it run.

    The only issue is that I cannot get the items that are within an application please help me with that part

    0
    Comment actions Permalink
  • Rich Stoldt

    +1

    The examples are way out-of-date and most will not build with the current API version.  I'm struggling with the getItems class - specifically understanding the FilterByValue parameter.

    Every single Java example invokes the getItemsByExternalId method, but none using the getItems method.  I'd sure like to see some updated examples that demonstrate a variety of methods using the Jave API and that will build without me having to rewrite the API calls.

    0
    Comment actions Permalink
  • Jeroen Tip

    That is where I am looking for examples and a good functional API call on the most basic importent object of PODIO and that is the ITEM so when somebody have it or a part of code to implement this missing part feel free to place it here I urgentlyt need it

    0
    Comment actions Permalink
  • Rich Stoldt

    I posted this in another topic.  Cheers.

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

            ItemsResponse response = itemAPI.getItems(2100929, 100, 0, null, false);

            System.out.println(response.toString());

            

            List<ItemBadge> items = response.getItems();

            for (ItemBadge item : items)

            {

                List<FieldValuesView> fields = item.getFields();

                for (FieldValuesView field : fields)

                {

                    System.out.println(field.getLabel().toString());

                    System.out.println(field.getValues().toString());

                }

            }

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk