Changeset 7304
- Timestamp:
- 06/13/2018 07:38:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php
r7292 r7304 322 322 } 323 323 324 $groups = array_chunk( $groups, 200, true ); 324 // Meetup API sometimes throws an error with chunk size larger than 50. 325 $groups = array_chunk( $groups, 50, true ); 325 326 326 327 foreach ( $groups as $group_batch ) { 327 $request_url = sprintf( 328 '%s2/events?group_id=%s&time=0,3m&page=%d&key=%s&status=upcoming,cancelled', 329 self::MEETUP_API_BASE_URL, 330 implode( ',', $group_batch ), 331 200, 332 MEETUP_API_KEY 328 $request_url = add_query_arg( 329 array( 330 'group_id' => implode( ',', $group_batch ), 331 'time' => '0,3m', 332 'page' => 200, 333 'status' => 'upcoming,cancelled', 334 ), 335 self::MEETUP_API_BASE_URL . '2/events' 333 336 ); 334 337 335 338 while ( ! empty( $request_url ) ) { 339 // The "next" URLs returned by the API need to be re-signed. 340 $request_url = add_query_arg( 341 array( 342 'sign' => true, 343 'key' => MEETUP_API_KEY, 344 ), 345 $request_url 346 ); 347 336 348 $this->log( 'fetching more events from: ' . var_export( $request_url, true ) ); 337 349
Note: See TracChangeset
for help on using the changeset viewer.