summaryrefslogtreecommitdiff
path: root/gdata
Commit message (Collapse)AuthorAgeFilesLines
* youtube: WIP work to port to API v3youtube-v3Philip Withnall2015-04-155-297/+540
|
* core: Correctly track JSON reader state when cloning nodesPhilip Withnall2015-04-141-5/+8
| | | | | | It is not safe to call json_reader_get_member_name() after recursing the parser state, so we have to copy the list of member names before iterating.
* core: Handle malformed OAuth2 grant response bodiesPhilip Withnall2015-04-141-0/+9
| | | | | It’s possible for the server to return an empty error response, which we must handle gracefully.
* core: Fix JSON parser state on hitting an errorPhilip Withnall2015-04-142-1/+4
| | | | | Close the entry element on error, otherwise the JsonParser stays in its error state.
* goa-authorizer: Set Authorization header as "Bearer ..."Carlos Garnacho2015-04-131-1/+1
| | | | | | | | Starting with "OAuth..." seems a CnP/leftover from OAuth1 support. RFC 6750 only observes the "Bearer" keyword though. This also seems consistent with GDataOAuth2Authorizer. https://bugzilla.gnome.org/show_bug.cgi?id=742473
* goa-authorizer: Add freebase domainCarlos Garnacho2015-04-131-0/+3
| | | | | | This is necessary for authorizers to correctly authorize freebase queries. https://bugzilla.gnome.org/show_bug.cgi?id=742473
* freebase: Fix authorization domainCarlos Garnacho2015-04-131-1/+1
| | | | | | Set up as per https://developers.google.com/freebase/v1/how-tos/authorizing#AboutAuthorization. https://bugzilla.gnome.org/show_bug.cgi?id=742473
* atom: Add macros for shared and viewedDebarshi Ray2015-04-131-0/+20
| | | | | | | | | Having pre-defined and documented macros demystifies these strange URL-like strings for the application developer. This adds the following new API: • GDATA_CATEGORY_SCHEMA_LABELS_SHARED • GDATA_CATEGORY_SCHEMA_LABELS_VIEWED
* tests: Indirectly test API keysCarlos Garnacho2015-03-054-4/+4
| | | | | | | Set a fake one on the service, so it can be checked when comparing with traces. https://bugzilla.gnome.org/show_bug.cgi?id=742472
* freebase: Pass API key as a GET variableCarlos Garnacho2015-03-051-0/+34
| | | | | | | This needs including on every freebase request if a developer key is set by the caller. https://bugzilla.gnome.org/show_bug.cgi?id=742472
* tests: Add tests for Freebase search APICarlos Garnacho2014-12-233-0/+195
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737541
* freebase: Fix locale-dependent issues in geolocated queriesCarlos Garnacho2014-12-231-2/+8
| | | | | | | | Latitude/longitude are really expected with a '.' decimal point by the service, breaking on locales that would use anything different. Use g_ascii_formatd which always uses the '.' decimal point. https://bugzilla.gnome.org/show_bug.cgi?id=737541
* freebase: Fix typo in search queryCarlos Garnacho2014-12-231-1/+1
| | | | | | | | The string array matches the GDataFreebaseSearchFilterType, using the FilterNodeType was unintended, and TYPE_CONTAINER happened to match GDATA_FREEBASE_SEARCH_FILTER_ALL. https://bugzilla.gnome.org/show_bug.cgi?id=737541
* freebase: Create async topic replies with the correct GTypeCarlos Garnacho2014-12-231-1/+1
| | | | | | | The async version was wrongly using the parent type, so the returned object wasn't a GDataFreebaseTopicResult at all. https://bugzilla.gnome.org/show_bug.cgi?id=737540
* freebase: Add GType for GDataFreebaseSearchResultItemCarlos Garnacho2014-12-233-0/+24
| | | | | | | | Making it a boxed type makes it friendly to bindings, as there's some more embedded knowledge about how to deal with this type memory-wise. https://bugzilla.gnome.org/show_bug.cgi?id=737936
* tests: Add tests for freebase topic APICarlos Garnacho2014-12-233-0/+4063
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737539
* freebase: Fix thinko when creating compound GDataFreebaseTopicObjectsCarlos Garnacho2014-12-211-1/+1
| | | | | | | | The check was actually inverted, receiving a newly created object is obviously the expected condition. This made the parsing of compound objects a lot more shallower than the received data. https://bugzilla.gnome.org/show_bug.cgi?id=737539
* freebase: reader_fill_object_gvalue() is only meant for "object" typesCarlos Garnacho2014-12-211-1/+1
| | | | | | | | | | Compound types are only meant to be handled through reader_fill_compound_gvalue(), which will iterate through its "property" array. Otherwise, compound elements with an ID (which is not mandatory, but ok for these to have) would be created as shallow objects instead of containers of further objects/values. https://bugzilla.gnome.org/show_bug.cgi?id=737539
* documents: Handle final page pagination in GDataDocumentsServicePhilip Withnall2014-12-121-1/+59
| | | | | | | | | The Google Documents servers always return a next page URI in a GDataFeed unless on the final page of results, in which case no URI is returned. Pass that information through to the GDataQuery so that pagination works correctly for Google Documents. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Explicitly support a final page in GDataQuery paginationPhilip Withnall2014-12-123-2/+61
| | | | | | | | | | | | | | | | | The pagination model previously used by GDataQuery was to assume that the server would return an empty GDataFeed once the final page was passed by calling gdata_query_next_page(). Unfortunately, the Google Documents servers don’t do that — instead, they provide a next page URI in each GDataFeed, and don’t provide one on the final page. GDataQuery did not support this kind of explicit knowledge about the current page being the final one. Add support for it with a delightful set of hacky internal functions. Return a dummy empty feed from GDataService if passed a GDataQuery which is flagged as having reached the end of its pagination. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Allow the GDataFeed type to be passed to _gdata_feed_new()Philip Withnall2014-12-123-6/+16
| | | | | | | This will be used internally later to support constructing custom empty feeds for pagination purposes. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Virtualise feed parsing in GDataServicePhilip Withnall2014-12-122-11/+53
| | | | | | | | | | | | | | | Split the bulk of feed parsing out into a virtual method on GDataService. This will allow subclasses of GDataService to implement service-specific tweaks to feed parsing, which is required for pagination handling with Google Documents. New API: • GDataServiceClass.parse_feed This does not break ABI — it consumes one of the struct’s expansion slots. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Eliminate unnecessary is_async argument from parser functionsPhilip Withnall2014-12-124-31/+31
| | | | | | | | | Instead, use g_main_context_invoke(), which guarantees to call the callback synchronously if the GMainContext is owned, and in an idle callback otherwise. This is exactly what we want for implementing callbacks which could come from this thread or a worker thread. https://bugzilla.gnome.org/show_bug.cgi?id=741345
* core: Use correct relation URI for next/previous feed linksPhilip Withnall2014-12-121-2/+2
| | | | | | | | GDataLink enforces that all relations are proper URIs, prefixing iana.org to those which aren’t — so we need to do the same when calling gdata_feed_look_up_link(). https://bugzilla.gnome.org/show_bug.cgi?id=741345
* tests: Switch to non-interactive tests by defaultPhilip Withnall2014-12-121-3/+7
| | | | | | This fixes `make check` stalling forever on requesting user input. To run the interactive tests, the programs now need to be run with --interactive.
* tests: Eliminate ISO 8601 formatting workaround for datesPhilip Withnall2014-12-124-52/+52
| | | | | | | Follow up to commit 732017e4e5235e28c578cc3367fa0c4548b65495732017e4e5235e28c578cc3367fa0c4548b65495. https://bugzilla.gnome.org/show_bug.cgi?id=739956
* tests: Temporarily disable some Contacts test assertionsPhilip Withnall2014-11-091-2/+3
| | | | | | Seems these elements broke on the server at some point. https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3662
* tests: Update Contacts test traces for ISO 8601 date changesPhilip Withnall2014-11-0937-652/+3197
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=737799
* tests: Remove pointless async authorizer tests from contacts.cPhilip Withnall2014-11-091-45/+1
| | | | | The authorisers are tested separately, and don’t need to be re-tested in each unit test suite.
* core: Eliminate ISO 8601 formatting workaround for datesPhilip Withnall2014-11-091-19/+1
| | | | | | | | Google have fixed the issue upstream, so the workaround is no longer needed. Thanks Google! https://bugzilla.gnome.org/show_bug.cgi?id=737799 https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3595
* core: Mark all API as stable and impose API and ABI stability guaranteesPhilip Withnall2014-11-03103-103/+103
| | | | | | | | It’s time for libgdata to grow up and start guaranteeing some stability for its users. In this vein, it’s already been API stable for around 3 years (since 0.9.1) — it’s about time that was made explicit. http://upstream-tracker.org/versions/libgdata.html is quite interesting.
* core: Add padding members to class structuresPhilip Withnall2014-11-0397-0/+555
| | | | | This gives us flexibility for soft ABI breaks in future if needed, after we lock down the ABI entirely.
* tests: Remove unnecessary non-NULL testPhilip Withnall2014-11-011-1/+1
| | | | | | It was confusing Coverity. Coverity issue: #74584
* tests: Add networked tests for the Google Tasks servicePhilip Withnall2014-09-2127-127/+2035
| | | | | | | This brings test coverage of the gdata/services/tasks/ directory up to 84% of lines and 90% of functions, which is good enough. https://bugzilla.gnome.org/show_bug.cgi?id=657539
* tasks: Add preconditions for tasklist IDs being set when inserting tasksPhilip Withnall2014-09-211-0/+4
| | | | Can’t insert a task to a non-tasklist.
* tasks: Handle an additional form of AUTHENTICATION_REQUIRED errorPhilip Withnall2014-09-211-1/+2
| | | | Apparently there are two ‘reason’ codes which correspond to this.
* core: Don’t unset refresh token on refreshing OAuth 2.0 authorisationPhilip Withnall2014-09-211-2/+4
| | | | | | | When refreshing an OAuth 2.0 authorisation, only a new access token is returned by the server — the refresh token is left unchanged, so a new one is not returned. Do not use that as an excuse to forget the existing refresh token.
* core: Handle ‘etag’ and ‘kind’ members in JSON feedsPhilip Withnall2014-09-211-0/+4
| | | | Set the GDataFeed:etag property and ignore the kind.
* tests: Call setlocale() on startupPhilip Withnall2014-09-211-0/+3
| | | | So that the correct character encoding is set for all tests.
* core: Add a GDataOAuth2Authorizer for OAuth 2.0 supportPhilip Withnall2014-09-2118-6/+2883
| | | | | | | | | | | | | | | | | This adds a new GDataAuthorizer subclass to support OAuth 2.0 authorisation, which is needed for the Google Tasks unit tests. This includes support for all Google OAuth 2.0 features (note that Google’s implementation of OAuth 2.0 is not entirely standard, so this OAuth 2.0 authoriser cannot be used outside of Google’s services). It includes full unit tests too. New API: • GDATA_OAUTH2_REDIRECT_URI_OOB • GDATA_OAUTH2_REDIRECT_URI_OOB_AUTO • GDataOAuth2Authorizer https://bugzilla.gnome.org/show_bug.cgi?id=646285
* Release version 0.16.0LIBGDATA_0_16_0Philip Withnall2014-09-185-10/+10
|
* tasks: Output the ‘hidden’ property in generated JSONPhilip Withnall2014-09-181-0/+3
| | | | | | It’s read-only, but that hasn’t stopped us outputting all the other read-only properties. This can be reverted if real life testing proves it’s a problem.
* tasks: Simplify some codePhilip Withnall2014-09-181-7/+2
| | | | This introduces no functional changes.
* core: Fix various minor mutex abusesPhilip Withnall2014-09-182-2/+6
| | | | | | | | GLib has recently got stricter about abusing mutexes, and now no longer allows: • Clearing a locked mutex. • Unlocking a non-locked mutex. Both of which libgdata was doing, and now does no longer.
* tests: Add support for the new SoupServer APIPhilip Withnall2014-09-181-43/+138
| | | | | This increments the maximum libsoup dependency to ≤ 2.47.3, but does not increment the minimum dependency.
* tests: Add unit tests for the Google Tasks servicePhilip Withnall2014-09-185-0/+875
| | | | | | | | | These are non-interactive and non-network tests, since I don’t currently have time to get networked tests working for Google Tasks — they require OAuth 2 support to land first (bug #646285). By themselves, these non-network tests give 64% line coverage and 74% function coverage of gdata/services/tasks/.
* tasks: Add a custom error parserPhilip Withnall2014-09-181-0/+184
| | | | | | | The errors returned by the Google Tasks API are a simple JSON format which allows for multiple error messages to be included. It appears to be undocumented anywhere, so has been reverse engineered from examples returned by the server.
* core: Add an error code in GDataServiceError for exceeding the API quotaPhilip Withnall2014-09-181-1/+5
| | | | | This adds API: • GDATA_SERVICE_ERROR_API_QUOTA_EXCEEDED
* tests: Add a dummy GDataAuthorizer implementationPhilip Withnall2014-09-183-0/+295
| | | | | | | | | | | | | | | | This will come in useful when testing services which don’t support ClientLogin authorisation, such as Google Tasks. Such services require OAuth authorisation, which requires user interaction. That puts up a big barrier to running the unit tests frequently, and Google seem to provide no ‘playground’ API key which could be used to bypass this requirement for testing purposes. The idea is that traces are recorded for tests using an OAuth authoriser (requiring user interaction), then the dummy authoriser is substituted when the tests are run offline against the pre-recorded traces. This will require custom message matching in uhttpmock to ignore the Authorization header, which will differ between the OAuth and dummy authorisers.
* tasks: Improve documentation for GDataTasksTask propertiesPhilip Withnall2014-09-151-4/+10
| | | | | Better document the format of datetime-typed properties — they are the number of seconds since the UNIX epoch.