Open daaronr opened 4 years ago
In function get_charity_fundraising_pages in functions.R
get_charity_fundraising_pages
The third line below is key:
charity_search_name <- gsub(' ', '%20', charity_name) uri <- paste('/v1/onesearch?q=', charity_search_name, '&i=Fundraiser&limit=9999', sep = '')
We want to get all the pages for each charity. Thus we need to edit this line to take an argument limiting this to a subset of those pages, and then iterate this over all subsets.
This JG page describes the onesearch tool
Can we add something like "campaignId starts with letter {{letter}}" and then iterate this over all alphanumeric characters, and then join them?
Also commented here
@TWJolly
I thought the 'offset' would help but it doesn't... doesn't seem to let you offset past 9999
https://api.justgiving.com/%7Bb83e9729%7D/v1/onesearch?q=Macmillan%20Cancer%20Support&i=Fundraiser&limit=9&offset=9980
https://api.justgiving.com/%7Bb83e9729%7D/v1/onesearch?q=Macmillan%20Cancer%20Support&i=Fundraiser&limit=9&offset=9997
In function
get_charity_fundraising_pages
in functions.RThe third line below is key:
We want to get all the pages for each charity. Thus we need to edit this line to take an argument limiting this to a subset of those pages, and then iterate this over all subsets.
This JG page describes the onesearch tool
Can we add something like "campaignId starts with letter {{letter}}" and then iterate this over all alphanumeric characters, and then join them?
Also commented here
@TWJolly