CARLI / select

CARLI E-Resource Brokering
GNU General Public License v3.0
5 stars 0 forks source link

API Json feed #28

Open eschell opened 6 years ago

eschell commented 6 years ago

Looking for a Json feed of the present Calendar Year which is this present year and the Fiscal Year that runs from July 1 to June 30. So right now 'Calendar Year 2017' and 'Fiscal Year 2018'

eschell commented 6 years ago

Would it be possible to make two new CouchDB views for this? A Calendar Year and Fiscal Year view. Make the view dependent upon the cycleName and having no funding?

eschell commented 6 years ago

Follow up for how I got my years. This is php I was using to pars out

`// Calendar Year $calendarYear = 'Calendar Year ' . $thisYear; // Fiscal year $fiscalDate1 = new DATETIME($thisYear . '-01-01'); $fiscalDate2 = new DATETIME($thisYear . '-07-31');

if (($thisDate > $fiscalDate1) &&($thisDate < $fiscalDate2)) { $fiscalDate = $thisYear; } else { $fiscalDate = $thisYear + 1; };`

patrickzurek commented 6 years ago

View should return most recently cycle that has been closed to the libraries.

mekane commented 6 years ago

@eschell , we added a new route for getting info about specific cycles. It includes the library id and the cycle name, with spaces, url-encoded. Example:

https://select-staff-devel.carli.illinois.edu/api/public/list-subscriptions-for-library/1/for-cycle-name/Calendar%20Year%202018