Comments (7)
Let me have a look....
from pipedrive.
Seems like API gets another parameter called start
, does it mean current page?
https://developers.pipedrive.com/docs/api/v1/#!/Persons/get_persons_id_activities
from pipedrive.
Yes, pagination works the same as other requests, like to get all deals. First request would be start=0, limit=500, second request would be start=500, third is start=1000, etc. Check the response for ['additional_data']['pagination']['more_items_in_collection'] = True to continue requesting.
from pipedrive.
Yeah, not sure if at this point we can implement something like pagination without any breaking changes. Since they do not have a "page" parameter, I'd say the solution would be to watch those response headers and request more manually...
Any idea how to deal with that respecting the current structure?
from pipedrive.
My php isn't strong enough to understand exactly what's happening in the source, but do the other objects->all() function not paginate? If they do it's the same process.
from pipedrive.
Looking at the response object from this call:
$acts = (array)$this->pd->persons()->activities($opts, ["limit" => 2])->getContent();
I see this in $acts['additional_data''] :
"pagination":{
"start":0,
"limit":2,
"more_items_in_collection":true,
"next_start":2
}
The second params to listActivities() takes in the start param as well, so I could write a for loop to paginate myself,
$acts = (array)$this->pd->persons()->activities($opts, ["limit" => 2, "start" => 2])->getContent();
from pipedrive.
As of now, this is the way to go.
Since they do not have a traditional pagination system, this was not taken into account when building this package. Nobody has previously requested this functionality but will consider an implementation of an V3 if becomes an issue in future and simplify the pagination.
from pipedrive.
Related Issues (20)
- itemSearch Endpoint Is Wrong HOT 2
- Find deal by custom field HOT 1
- Service Provider :: Wrong Dependency Injection HOT 1
- Find organization by company_id
- Error: Wrong parameters for PipedriveException HOT 1
- ErrorException: Attempt to read property "message" on string HOT 2
- Get the details of a person by id? HOT 1
- Search users by email - missing trait?
- Verbose info for logging exception reasons HOT 2
- Removal of follower_count updates in Webhooks December 6, 2021 HOT 1
- details of a specific deal
- Add Search trait to Leads HOT 1
- Dynamic Property Deprecated for PHP v 8.2 HOT 1
- API break on addProduct to deals HOT 1
- Improved error handling for HTTP Response isSuccess method HOT 1
- How to update the stage of a deal? HOT 1
- Undefined property: stdClass::$success HOT 4
- findByName() Method Should Not be Globally Deprecated HOT 1
- PipedriveToken class constructor changes token values HOT 3
- Changes on API endpoints in March 2021 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pipedrive.