PHP - get all files between specific dates

Comments

5 comments

  • Domenico Matteo

    Hi Luis, 

    can you provide us with the error message you're receiving?

    Thanks,
    Domenico

    0
    Comment actions Permalink
  • Luis Almeida

    Hi, here it goes:

    Warning: urlencode() expects parameter 1 to be string, array given in D:\xampp\htdocs\podio-php-4.3.0\lib\Podio.php on line 371

    Fatal error: Uncaught PodioBadRequestError: "The values are not in the right format" Request URL: http://api.podio.com/file/?created_on= Stack Trace: #0 D:\xampp\htdocs\podio-php-4.3.0\lib\Podio.php(349): Podio::request('GET', '/file/', Array, Array) #1 D:\xampp\htdocs\podio-php-4.3.0\models\PodioFile.php(104): Podio::get('/file/', Array) #2 D:\xampp\htdocs\podio-php-4.3.0\get_files_dellent.php(29): PodioFile::get_all(Array) #3 {main} thrown in D:\xampp\htdocs\podio-php-4.3.0\lib\Podio.php on line 289

     

    1
    Comment actions Permalink
  • Domenico Matteo

    It looks like the PHP SDK is asking for a string in the 'created_on' property, but you're providing an array (which should work, according to the view doc).

    Can you try passing a single date as string instead of an object?

    If that works, the PHP SDK is not (yet) compatible with date ranges for files.

    0
    Comment actions Permalink
  • Luis Almeida

    i've tried:

    'created_on' => '2016-05-02'

    got this error:

    Fatal error: Uncaught PodioBadRequestError: "The values are not in the right format" Request URL: http://api.podio.com/file/app/6107280/?limit=1&sort_by=created_on&created_on=2016-05-02 Stack Trace: #0 D:\xampp\htdocs\podio-php-4.3.0\lib\Podio.php(349): Podio::request('GET', '/file/app/61072...', Array, Array) #1 D:\xampp\htdocs\podio-php-4.3.0\models\PodioFile.php(68): Podio::get('/file/app/61072...', Array) #2 D:\xampp\htdocs\podio-php-4.3.0\get_files_dellent.php(31): PodioFile::get_for_app('6107280', Array) #3 {main} thrown in D:\xampp\htdocs\podio-php-4.3.0\lib\Podio.php on line 289

    0
    Comment actions Permalink
  • Andrew Brown

    Any follow up on this? I'm having the same problem

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk