Google Maps API

Answered

Comments

9 comments

  • Christian Holm

    Did you read the documentation at https://developers.podio.com/authentication? 

    0
    Comment actions Permalink
  • Daniel Karpantschof

    Indeed I have. 

    I'm not a pro developer, but accustomed enough to build on other platforms (insert n00b comments here) – yet Podio's API is for some reason less accessible than any other thing I've seen to date.

    0
    Comment actions Permalink
  • Christian Holm

    Which language are you using? We have clients for most languages where the OAuth2 part is already handled. That is much easier to start with if you are not comfortable with making HTTP requests.

    Just saying that it is poor is not very constructive. It would help a lot if you:

    a) wrote which language you are using

    b) what you tried and what the error message is

    0
    Comment actions Permalink
  • Daniel Karpantschof

    Oh, sorry! My bad.

    PHP.

    I tried authenticating to an app (see attached files)

    Thanks :)

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi Daniel,

    We have quite a bit of documentation available. The developer site has among other things tutorials on authentication that Christian linked to and an article on how to work with items that will be relevant if you want to place items on maps: https://developers.podio.com/examples/items

    In addition the PHP client download comes with a ton of examples in the 'examples' folder: https://github.com/podio/podio-php/tree/master/examples

    The sample-gmap repository you link to an 2 years old and many things have changed since then. There's a completely new PHP client library that is much easier to work with and I'm pretty sure there's a new Google Maps API as well. I wouldn't recommend looking as code that old for guidance. It's better if you stick to the developer site and the current release of the PHP client library.

    As you can see it's very little Podio API work that's needed -- the examples I link to above will illustrate how to get a collection and work with the individual fields. That's all you need from the Podio side of things. I'll be removing the sample-gmap repository so others won't be confused about it.

    We would love to hear specific suggestions about how to improve our documentation. It's hard to determine how to improve without knowing what you have tried, how it failed and your suggestion on how to make it better.

    All the best,

    Andreas 

    0
    Comment actions Permalink
  • Daniel Karpantschof

    Hi Andreas,

    Thanks for helping out. Yeah the gmap example is pretty outdated.

    I managed to authenticate properly and pull items through the filter call.

    Using print_r($item_collection'), I end up with something along the following lines

    Array ( [items] => Array ( [0] => PodioItem Object ( [\_attributes] => Array ( [item_id] => 32784523 [external_id] => [title] => Washington DC [link] => https://sandbox-network.podio.com/central-command/item/32784523 [rights] => Array ( [0] => add_task [1] => rate [2] => comment [3] => view [4] => add_conversation [5] => subscribe ) [initial_revision] => PodioItemRevision Object ( [__attributes] => Array ( [revision] => [created_on] => 2013-02-05 20:39:14 [created_by] => PodioByLine Object ( [__attributes] => Array ( [type] => user [id] => 1131599 [avatar_type] => file [avatar_id] => 26485291 [image] => Array ( [perma_link] => [hosted_by] => podio [hosted_by_humanized_name] => Podio [thumbnail_link] => ..._

    How do I select which fields to pull, so I won't end up with the whole dump?

    Thanks a billion!

    //D

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    Hi Daniel,

    As you can see the result is a hash with the 'items' key holding an array of PodioItem instances. So loop over that to get to each item. For each individual items the PodioItem class has a number of methods you can use. You can see a bunch of examples in the examples folder inside podio-php. Specifically https://github.com/podio/podio-php/blob/master/examples/items.php

    Does that help?

    /Andreas

    0
    Comment actions Permalink
  • Daniel Karpantschof

    Hi Andreas,

    Gotcha! Thanks! I thought the filtered array would return all items in the same format as getitem.

    How would you structure it to return all items in an app, with only specific fields returned?

    //D

    0
    Comment actions Permalink
  • Andreas Haugstrup Pedersen

    You always get all fields returned for each item. You can see in the examples I linked to how to easily get the value of specific fields using the ->field() method (starts on line 27)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk