diff --git a/docs/schema.md b/docs/schema.md index 1f4711c..53c499f 100644 --- a/docs/schema.md +++ b/docs/schema.md @@ -84,7 +84,7 @@ type Area implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection # A list of tags linked to this entity. @@ -215,9 +215,12 @@ type Artist implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } @@ -656,9 +659,12 @@ type Event implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } @@ -725,7 +731,7 @@ type Instrument implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection # A list of tags linked to this entity. @@ -850,9 +856,12 @@ type Label implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } @@ -1081,7 +1090,7 @@ type Place implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection # A list of tags linked to this entity. @@ -1133,6 +1142,18 @@ type Query { ): Node } +# [Ratings](https://musicbrainz.org/doc/Rating_System) allow users +# to rate MusicBrainz entities. User may assign a value between 1 and 5; these +# values are then aggregated by the server to compute an average community rating +# for the entity. +type Rating { + # The number of votes that have contributed to the rating. + voteCount: Int! + + # The average rating value based on the aggregated votes. + value: Int +} + # A [recording](https://musicbrainz.org/doc/Recording) is an # entity in MusicBrainz which can be linked to tracks on releases. Each track must # always be associated with a single recording, but a recording can be linked to @@ -1196,9 +1217,12 @@ type Recording implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } @@ -1599,7 +1623,7 @@ type Release implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection # A list of tags linked to this entity. @@ -1708,9 +1732,12 @@ type ReleaseGroup implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } @@ -1974,7 +2001,7 @@ type Series implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection # A list of tags linked to this entity. @@ -2107,9 +2134,12 @@ type Work implements Node, Entity { # Relationships between this entity and other entitites. relationships: Relationships - # A list of collections linked to this entity. + # A list of collections containing this entity. collections(after: String, first: Int): CollectionConnection + # The rating users have given to this entity. + rating: Rating + # A list of tags linked to this entity. tags(after: String, first: Int): TagConnection } diff --git a/docs/types.md b/docs/types.md index eef0911..f016348 100644 --- a/docs/types.md +++ b/docs/types.md @@ -34,6 +34,7 @@ You may also be interested in reading the [schema in GraphQL syntax](schema.md).
  • [Place](#place)
  • [PlaceConnection](#placeconnection)
  • [PlaceEdge](#placeedge)
  • +
  • [Rating](#rating)
  • [Recording](#recording)
  • [RecordingConnection](#recordingconnection)
  • [RecordingEdge](#recordingedge)
  • @@ -371,7 +372,7 @@ the codes assigned by ISO to countries and subdivisions. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -714,7 +715,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -727,6 +728,13 @@ field. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection @@ -1754,7 +1762,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -1767,6 +1775,13 @@ field. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection @@ -1941,7 +1956,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -2193,7 +2208,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -2206,6 +2221,13 @@ field. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection @@ -2723,7 +2745,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -2825,6 +2847,36 @@ these results were found through a search. +### Rating + +[Ratings](https://musicbrainz.org/doc/Rating_System) allow users +to rate MusicBrainz entities. User may assign a value between 1 and 5; these +values are then aggregated by the server to compute an average community rating +for the entity. + + + + + + + + + + + + + + + + + + +
    Field / ArgumentTypeDescription
    voteCount Int! + The number of votes that have contributed to the rating. +
    value Int + The average rating value based on the aggregated votes. +
    + ### Recording A [recording](https://musicbrainz.org/doc/Recording) is an @@ -2981,7 +3033,7 @@ from the lengths of the tracks using it. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -2994,6 +3046,13 @@ from the lengths of the tracks using it. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection @@ -4024,7 +4083,7 @@ It is not a mark of how good or bad the music itself is – for that, use collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -4324,7 +4383,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -4337,6 +4396,13 @@ field. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection @@ -4760,7 +4826,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -5111,7 +5177,7 @@ field. collections CollectionConnection - A list of collections linked to this entity. + A list of collections containing this entity. @@ -5124,6 +5190,13 @@ field. Int + + rating + Rating + + The rating users have given to this entity. + + tags TagConnection diff --git a/schema.json b/schema.json index e75dcd0..ce19f01 100644 --- a/schema.json +++ b/schema.json @@ -771,7 +771,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -1761,7 +1761,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -1792,6 +1792,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", @@ -2282,7 +2294,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -2313,6 +2325,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", @@ -3087,7 +3111,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -3642,7 +3666,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -3673,6 +3697,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", @@ -6003,7 +6039,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -6034,6 +6070,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", @@ -6094,6 +6142,45 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "Rating", + "description": "[Ratings](https://musicbrainz.org/doc/Rating_System) allow users\nto rate MusicBrainz entities. User may assign a value between 1 and 5; these\nvalues are then aggregated by the server to compute an average community rating\nfor the entity.", + "fields": [ + { + "name": "voteCount", + "description": "The number of votes that have contributed to the rating.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "The average rating value based on the aggregated votes.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "TagConnection", @@ -6472,7 +6559,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -6855,7 +6942,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -7372,7 +7459,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -7403,6 +7490,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", @@ -7658,7 +7757,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -8021,7 +8120,7 @@ }, { "name": "collections", - "description": "A list of collections linked to this entity.", + "description": "A list of collections containing this entity.", "args": [ { "name": "after", @@ -8052,6 +8151,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "rating", + "description": "The rating users have given to this entity.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Rating", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "tags", "description": "A list of tags linked to this entity.", diff --git a/src/resolvers.js b/src/resolvers.js index 1b8ddbb..8f8b80c 100644 --- a/src/resolvers.js +++ b/src/resolvers.js @@ -43,6 +43,7 @@ export function includeSubqueries (params, info, fragments = info.fragments) { artistCredits: 'artist-credits', isrcs: 'isrcs', media: 'media', + rating: 'ratings', tags: 'tags' } let fields = getFields(info, fragments) diff --git a/src/types/artist.js b/src/types/artist.js index d2d1357..a1dc256 100644 --- a/src/types/artist.js +++ b/src/types/artist.js @@ -19,6 +19,7 @@ import { works, relationships, collections, + rating, tags, connectionWithExtras } from './helpers' @@ -84,6 +85,7 @@ neither. Groups do not have genders.` works, relationships, collections, + rating, tags }) }) diff --git a/src/types/event.js b/src/types/event.js index 95a206e..d4b603d 100644 --- a/src/types/event.js +++ b/src/types/event.js @@ -12,6 +12,7 @@ import { lifeSpan, relationships, collections, + rating, tags, connectionWithExtras } from './helpers' @@ -48,6 +49,7 @@ for syntax and examples.` }), relationships, collections, + rating, tags }) }) diff --git a/src/types/helpers.js b/src/types/helpers.js index a0e81d2..32c497d 100644 --- a/src/types/helpers.js +++ b/src/types/helpers.js @@ -26,6 +26,7 @@ import { InstrumentConnection } from './instrument' import { LabelConnection } from './label' import LifeSpan from './life-span' import { PlaceConnection } from './place' +import Rating from './rating' import { RecordingConnection } from './recording' import { RelationshipConnection } from './relationship' import { ReleaseConnection } from './release' @@ -215,6 +216,12 @@ and will be removed in a major release in the future. Use the equivalent \`artistCredits\` field.` } +export const rating = { + type: Rating, + description: 'The rating users have given to this entity.', + resolve: createSubqueryResolver({ inc: 'ratings' }) +} + export const releaseGroupType = { type: new GraphQLList(ReleaseGroupType), description: 'Filter by one or more release group types.' diff --git a/src/types/label.js b/src/types/label.js index 465158f..760fe5d 100644 --- a/src/types/label.js +++ b/src/types/label.js @@ -20,6 +20,7 @@ import { relationships, collections, tags, + rating, fieldWithID, connectionWithExtras } from './helpers' @@ -63,6 +64,7 @@ imprint, production, distributor, rights society, etc.` releases, relationships, collections, + rating, tags }) }) diff --git a/src/types/rating.js b/src/types/rating.js new file mode 100644 index 0000000..6047302 --- /dev/null +++ b/src/types/rating.js @@ -0,0 +1,24 @@ +import { + GraphQLObjectType, + GraphQLNonNull, + GraphQLInt +} from 'graphql/type' + +export default new GraphQLObjectType({ + name: 'Rating', + description: `[Ratings](https://musicbrainz.org/doc/Rating_System) allow users +to rate MusicBrainz entities. User may assign a value between 1 and 5; these +values are then aggregated by the server to compute an average community rating +for the entity.`, + fields: () => ({ + voteCount: { + type: new GraphQLNonNull(GraphQLInt), + description: 'The number of votes that have contributed to the rating.', + resolve: rating => rating['votes-count'] + }, + value: { + type: GraphQLInt, + description: 'The average rating value based on the aggregated votes.' + } + }) +}) diff --git a/src/types/recording.js b/src/types/recording.js index a8c2e30..cf950ca 100644 --- a/src/types/recording.js +++ b/src/types/recording.js @@ -18,6 +18,7 @@ import { releases, relationships, collections, + rating, tags, connectionWithExtras } from './helpers' @@ -63,6 +64,7 @@ from the lengths of the tracks using it.` releases, relationships, collections, + rating, tags }) }) diff --git a/src/types/release-group.js b/src/types/release-group.js index 4e100e7..6161202 100644 --- a/src/types/release-group.js +++ b/src/types/release-group.js @@ -15,6 +15,7 @@ import { releases, relationships, collections, + rating, tags, fieldWithID, resolveHyphenated, @@ -61,6 +62,7 @@ that apply to this release group.` releases, relationships, collections, + rating, tags }) }) diff --git a/src/types/work.js b/src/types/work.js index fa36133..4628ee6 100644 --- a/src/types/work.js +++ b/src/types/work.js @@ -10,6 +10,7 @@ import { artists, relationships, collections, + rating, tags, fieldWithID, connectionWithExtras @@ -42,6 +43,7 @@ to the work by copyright collecting agencies.` artists, relationships, collections, + rating, tags }) }) diff --git a/test/fixtures/029295853b01dffc8f5061e3ab19a1f5 b/test/fixtures/029295853b01dffc8f5061e3ab19a1f5 new file mode 100644 index 0000000..820f6f2 Binary files /dev/null and b/test/fixtures/029295853b01dffc8f5061e3ab19a1f5 differ diff --git a/test/fixtures/029295853b01dffc8f5061e3ab19a1f5.headers b/test/fixtures/029295853b01dffc8f5061e3ab19a1f5.headers new file mode 100644 index 0000000..df97963 --- /dev/null +++ b/test/fixtures/029295853b01dffc8f5061e3ab19a1f5.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:57 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "412", + "x-ratelimit-reset": "1481671678", + "server": "Plack::Handler::Starlet", + "etag": "W/\"8a5c86a2265b61562bb0731bb587d055\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/420a9402-0a87-4510-81a3-60f513a47466?inc=ratings&fmt=json", + "time": 403, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455 b/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455 new file mode 100644 index 0000000..a60a750 Binary files /dev/null and b/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455 differ diff --git a/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455.headers b/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455.headers new file mode 100644 index 0000000..17a0bec --- /dev/null +++ b/test/fixtures/053f4fa909ff28b9a7977ea4c79d3455.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:57 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "422", + "x-ratelimit-reset": "1481671678", + "server": "Plack::Handler::Starlet", + "etag": "W/\"e1e4c55b69b5ae512e5d59a56863b19a\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/aeff6db2-1fc2-4c46-8218-c4ac52e0066c?inc=ratings&fmt=json", + "time": 415, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/113db52529ee59875c0e8938b8176ac9 b/test/fixtures/113db52529ee59875c0e8938b8176ac9 new file mode 100644 index 0000000..2ced40a Binary files /dev/null and b/test/fixtures/113db52529ee59875c0e8938b8176ac9 differ diff --git a/test/fixtures/113db52529ee59875c0e8938b8176ac9.headers b/test/fixtures/113db52529ee59875c0e8938b8176ac9.headers new file mode 100644 index 0000000..c9a507c --- /dev/null +++ b/test/fixtures/113db52529ee59875c0e8938b8176ac9.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:41 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "461", + "x-ratelimit-reset": "1481671662", + "server": "Plack::Handler::Starlet", + "etag": "W/\"70460373241b5746d0a2432b2fb2c484\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/9d36ba13-e56a-47b7-9148-23f846374736?inc=ratings&fmt=json", + "time": 393, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/14d10341ea355048f1c3b6bd9a398842 b/test/fixtures/14d10341ea355048f1c3b6bd9a398842 new file mode 100644 index 0000000..957b454 Binary files /dev/null and b/test/fixtures/14d10341ea355048f1c3b6bd9a398842 differ diff --git a/test/fixtures/14d10341ea355048f1c3b6bd9a398842.headers b/test/fixtures/14d10341ea355048f1c3b6bd9a398842.headers new file mode 100644 index 0000000..2287f92 --- /dev/null +++ b/test/fixtures/14d10341ea355048f1c3b6bd9a398842.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:08 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "118", + "x-ratelimit-reset": "1481671688", + "server": "Plack::Handler::Starlet", + "etag": "W/\"3782bf3581eed4ba0d5850dc94a0ca0d\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group/abd672ff-6c87-44b5-8606-5b763215cbe7?inc=ratings&fmt=json", + "time": 391, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a b/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a new file mode 100644 index 0000000..c27f7d5 Binary files /dev/null and b/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a differ diff --git a/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a.headers b/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a.headers new file mode 100644 index 0000000..16c14ac --- /dev/null +++ b/test/fixtures/1bdc0182f4c05cf480eb9c05af4b976a.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:57 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "419", + "x-ratelimit-reset": "1481671678", + "server": "Plack::Handler::Starlet", + "etag": "W/\"0ba6df54863d57d2f26778fce75b4c91\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/434a4dd4-83b2-43a5-89cb-dadabd3dfcba?inc=ratings&fmt=json", + "time": 400, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b b/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b new file mode 100644 index 0000000..affdc13 Binary files /dev/null and b/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b differ diff --git a/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b.headers b/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b.headers new file mode 100644 index 0000000..d076f1e --- /dev/null +++ b/test/fixtures/2003d2a9c13b2ec4afe52c7de9146d7b.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:02 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "580", + "x-ratelimit-reset": "1481671684", + "server": "Plack::Handler::Starlet", + "etag": "W/\"83ab97def6b9004d50ef5a87fc16a4fa\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/91b5bd2b-b7ef-4929-b082-c52c41450664?inc=ratings&fmt=json", + "time": 409, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/2411747e0c5d0669d100ab1d280e10d4 b/test/fixtures/2411747e0c5d0669d100ab1d280e10d4 new file mode 100644 index 0000000..eef04e7 Binary files /dev/null and b/test/fixtures/2411747e0c5d0669d100ab1d280e10d4 differ diff --git a/test/fixtures/2411747e0c5d0669d100ab1d280e10d4.headers b/test/fixtures/2411747e0c5d0669d100ab1d280e10d4.headers new file mode 100644 index 0000000..e7613bf --- /dev/null +++ b/test/fixtures/2411747e0c5d0669d100ab1d280e10d4.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:02 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "585", + "x-ratelimit-reset": "1481671684", + "server": "Plack::Handler::Starlet", + "etag": "W/\"70f4421a70167bef8d928e887a2d7d33\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/3fd14004-8fb0-4f4c-81a6-15d237616ff2?inc=ratings&fmt=json", + "time": 402, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/310dd8dea7247669130cde2559bae02f b/test/fixtures/310dd8dea7247669130cde2559bae02f new file mode 100644 index 0000000..c56dc80 Binary files /dev/null and b/test/fixtures/310dd8dea7247669130cde2559bae02f differ diff --git a/test/fixtures/310dd8dea7247669130cde2559bae02f.headers b/test/fixtures/310dd8dea7247669130cde2559bae02f.headers new file mode 100644 index 0000000..224d7a7 --- /dev/null +++ b/test/fixtures/310dd8dea7247669130cde2559bae02f.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:51 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "301", + "x-ratelimit-reset": "1481671672", + "server": "Plack::Handler::Starlet", + "etag": "W/\"68e14bbf160ea632492a141bd851d485\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/e899f760-c30e-4c74-8665-a1c34894ecf6?inc=ratings&fmt=json", + "time": 407, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304 b/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304 new file mode 100644 index 0000000..47b8ff8 Binary files /dev/null and b/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304 differ diff --git a/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304.headers b/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304.headers new file mode 100644 index 0000000..9172307 --- /dev/null +++ b/test/fixtures/3bd3d3302c90a0bc9ed720a831ff3304.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:02 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "587", + "x-ratelimit-reset": "1481671684", + "server": "Plack::Handler::Starlet", + "etag": "W/\"4512b68e22d30476cb2db9ec2deb0325\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/b357e320-636d-4a8d-96f3-89fe6897544c?inc=ratings&fmt=json", + "time": 400, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/3d374d64c41545bf2538e8c89472ed9d b/test/fixtures/3d374d64c41545bf2538e8c89472ed9d new file mode 100644 index 0000000..c5ad63a Binary files /dev/null and b/test/fixtures/3d374d64c41545bf2538e8c89472ed9d differ diff --git a/test/fixtures/3d374d64c41545bf2538e8c89472ed9d.headers b/test/fixtures/3d374d64c41545bf2538e8c89472ed9d.headers new file mode 100644 index 0000000..fba38c6 --- /dev/null +++ b/test/fixtures/3d374d64c41545bf2538e8c89472ed9d.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:57 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "424", + "x-ratelimit-reset": "1481671678", + "server": "Plack::Handler::Starlet", + "etag": "W/\"7ccfb462ff6e8aad1443307559453420\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/4f63389d-c520-4d57-ade5-0e3c737931e3?inc=ratings&fmt=json", + "time": 398, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/43296de566b64880545e57a0fadb7712 b/test/fixtures/43296de566b64880545e57a0fadb7712 new file mode 100644 index 0000000..5187c01 Binary files /dev/null and b/test/fixtures/43296de566b64880545e57a0fadb7712 differ diff --git a/test/fixtures/43296de566b64880545e57a0fadb7712.headers b/test/fixtures/43296de566b64880545e57a0fadb7712.headers new file mode 100644 index 0000000..153d4ed --- /dev/null +++ b/test/fixtures/43296de566b64880545e57a0fadb7712.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:40 GMT", + "content-type": "application/json; charset=UTF-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "584", + "x-ratelimit-reset": "1481671662", + "last-modified": "Tue, 13 Dec 2016 22:42:30 GMT", + "server": "Jetty(9.3.10.v20160621)", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group?inc=ratings&query=arid%3Ac8da2e40-bd28-4d4e-813a-bd2f51958ba8&fmt=json", + "time": 372, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e b/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e new file mode 100644 index 0000000..27fecb5 Binary files /dev/null and b/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e differ diff --git a/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e.headers b/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e.headers new file mode 100644 index 0000000..ccb50b4 --- /dev/null +++ b/test/fixtures/45daa19eb100ee93bf814b6b7c76d81e.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:46 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "139", + "x-ratelimit-reset": "1481671666", + "server": "Plack::Handler::Starlet", + "etag": "W/\"9153a9da91c7fb7f0b5c6cef150053d1\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/156fa9e1-1385-41c5-9403-54effeeab69c?inc=ratings&fmt=json", + "time": 412, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/4e1f01ba60b51a0696cc97178a29068a b/test/fixtures/4e1f01ba60b51a0696cc97178a29068a new file mode 100644 index 0000000..53806e1 Binary files /dev/null and b/test/fixtures/4e1f01ba60b51a0696cc97178a29068a differ diff --git a/test/fixtures/4e1f01ba60b51a0696cc97178a29068a.headers b/test/fixtures/4e1f01ba60b51a0696cc97178a29068a.headers new file mode 100644 index 0000000..fb86131 --- /dev/null +++ b/test/fixtures/4e1f01ba60b51a0696cc97178a29068a.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:35 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "371", + "x-ratelimit-reset": "1481671656", + "server": "Plack::Handler::Starlet", + "etag": "W/\"acf01548d4499ceaa8dd01a8b80d2160\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/event/eec75a81-8864-4cea-b8b4-e99cd08b29f1?inc=ratings&fmt=json", + "time": 601, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/6bef22d668064a78bf636a32f4b4a536 b/test/fixtures/6bef22d668064a78bf636a32f4b4a536 new file mode 100644 index 0000000..2e87079 Binary files /dev/null and b/test/fixtures/6bef22d668064a78bf636a32f4b4a536 differ diff --git a/test/fixtures/6bef22d668064a78bf636a32f4b4a536.headers b/test/fixtures/6bef22d668064a78bf636a32f4b4a536.headers new file mode 100644 index 0000000..783431c --- /dev/null +++ b/test/fixtures/6bef22d668064a78bf636a32f4b4a536.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:51 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "306", + "x-ratelimit-reset": "1481671672", + "server": "Plack::Handler::Starlet", + "etag": "W/\"1b5511793df8dac598ed5256ef08536d\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/2757a11f-0dbd-4f0c-97f6-f62532972898?inc=ratings&fmt=json", + "time": 414, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203 b/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203 new file mode 100644 index 0000000..f829614 Binary files /dev/null and b/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203 differ diff --git a/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203.headers b/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203.headers new file mode 100644 index 0000000..3a72cf7 --- /dev/null +++ b/test/fixtures/6d67e76967cd5d93d61d515f2e6bb203.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:08 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "117", + "x-ratelimit-reset": "1481671688", + "server": "Plack::Handler::Starlet", + "etag": "W/\"f1e4c1df4d2478f3d66ac65b41aad375\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group/e37d2740-4503-4e3f-ab6d-e622a25e964d?inc=ratings&fmt=json", + "time": 393, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42 b/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42 new file mode 100644 index 0000000..d85f8fa Binary files /dev/null and b/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42 differ diff --git a/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42.headers b/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42.headers new file mode 100644 index 0000000..54216e7 --- /dev/null +++ b/test/fixtures/7ecaf522c01ab6ec413eebc9f2e16a42.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:02 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "579", + "x-ratelimit-reset": "1481671684", + "server": "Plack::Handler::Starlet", + "etag": "W/\"de349eafa16a841eba0befe68a0d6908\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/8cece665-cfb1-48da-9e68-3991021578ba?inc=ratings&fmt=json", + "time": 411, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca b/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca new file mode 100644 index 0000000..d3ec49d Binary files /dev/null and b/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca differ diff --git a/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca.headers b/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca.headers new file mode 100644 index 0000000..dac0489 --- /dev/null +++ b/test/fixtures/8b1602fb8d6a9d91230c48f5152a25ca.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:57 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "417", + "x-ratelimit-reset": "1481671678", + "server": "Plack::Handler::Starlet", + "etag": "W/\"7847e7e958af2a9a47f0686714817482\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/e8311742-aaa3-48ef-b2ea-34b1efcc936b?inc=ratings&fmt=json", + "time": 415, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810 b/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810 new file mode 100644 index 0000000..df02cae Binary files /dev/null and b/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810 differ diff --git a/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810.headers b/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810.headers new file mode 100644 index 0000000..6654fe0 --- /dev/null +++ b/test/fixtures/97957d6dbc8b2d81b65d1b57c0c20810.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:41 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "460", + "x-ratelimit-reset": "1481671662", + "server": "Plack::Handler::Starlet", + "etag": "W/\"6fc7aaee78bac7a9f58fbd576dcef194\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/e1404b13-dc91-4d7e-ab05-932995207bc3?inc=ratings&fmt=json", + "time": 388, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/99528bcc7f6586bde435b2b8d64b241a b/test/fixtures/99528bcc7f6586bde435b2b8d64b241a new file mode 100644 index 0000000..144e446 Binary files /dev/null and b/test/fixtures/99528bcc7f6586bde435b2b8d64b241a differ diff --git a/test/fixtures/99528bcc7f6586bde435b2b8d64b241a.headers b/test/fixtures/99528bcc7f6586bde435b2b8d64b241a.headers new file mode 100644 index 0000000..05576f4 --- /dev/null +++ b/test/fixtures/99528bcc7f6586bde435b2b8d64b241a.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:08 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "113", + "x-ratelimit-reset": "1481671688", + "server": "Plack::Handler::Starlet", + "etag": "W/\"1e4b1d772a7ccd2b674b4d0c15077b23\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group/25193cc2-b39a-4a55-9aa6-d1a0fa3ba858?inc=ratings&fmt=json", + "time": 395, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/9cd666caa3723edc6f5438fed0898f86 b/test/fixtures/9cd666caa3723edc6f5438fed0898f86 new file mode 100644 index 0000000..6939e01 Binary files /dev/null and b/test/fixtures/9cd666caa3723edc6f5438fed0898f86 differ diff --git a/test/fixtures/9cd666caa3723edc6f5438fed0898f86.headers b/test/fixtures/9cd666caa3723edc6f5438fed0898f86.headers new file mode 100644 index 0000000..8bb1c60 --- /dev/null +++ b/test/fixtures/9cd666caa3723edc6f5438fed0898f86.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:35 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "362", + "x-ratelimit-reset": "1481671656", + "server": "Plack::Handler::Starlet", + "etag": "W/\"7d057ca1b12e555b3f9a32a4c19a7cc6\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/recording?artist=c8da2e40-bd28-4d4e-813a-bd2f51958ba8&inc=ratings&fmt=json", + "time": 614, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69 b/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69 new file mode 100644 index 0000000..e987ebf Binary files /dev/null and b/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69 differ diff --git a/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69.headers b/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69.headers new file mode 100644 index 0000000..602d77e --- /dev/null +++ b/test/fixtures/9f53b77c31b1a112ff1f5725b912cf69.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:46 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "138", + "x-ratelimit-reset": "1481671666", + "server": "Plack::Handler::Starlet", + "etag": "W/\"f3f3ca20075fcaa826b06a8abcf6df21\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/c2c769a9-473a-44d2-a8ab-2048e91bbbd2?inc=ratings&fmt=json", + "time": 409, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/a310e26b9e92f2a0bab61d4d42912714 b/test/fixtures/a310e26b9e92f2a0bab61d4d42912714 new file mode 100644 index 0000000..ad2bbc8 Binary files /dev/null and b/test/fixtures/a310e26b9e92f2a0bab61d4d42912714 differ diff --git a/test/fixtures/a310e26b9e92f2a0bab61d4d42912714.headers b/test/fixtures/a310e26b9e92f2a0bab61d4d42912714.headers new file mode 100644 index 0000000..7194bc2 --- /dev/null +++ b/test/fixtures/a310e26b9e92f2a0bab61d4d42912714.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:35 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "369", + "x-ratelimit-reset": "1481671656", + "server": "Plack::Handler::Starlet", + "etag": "W/\"7c40152ab47579632a5add40415303e2\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/artist?work=8a25ce1e-8695-42c0-b668-8f0aa057c72b&inc=ratings&fmt=json", + "time": 612, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1 b/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1 new file mode 100644 index 0000000..79b8196 Binary files /dev/null and b/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1 differ diff --git a/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1.headers b/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1.headers new file mode 100644 index 0000000..b333942 --- /dev/null +++ b/test/fixtures/ab0e9518dfae4758d6cf8280b4eb0dd1.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:51 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "309", + "x-ratelimit-reset": "1481671672", + "server": "Plack::Handler::Starlet", + "etag": "W/\"ecba065c32f9e71753d2a63f16ab6865\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/526d91b9-e6d4-4ecd-a509-52c79f76adbe?inc=ratings&fmt=json", + "time": 401, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/b30ba256126ec9d876b63af6d41040f7 b/test/fixtures/b30ba256126ec9d876b63af6d41040f7 new file mode 100644 index 0000000..cdaa98a Binary files /dev/null and b/test/fixtures/b30ba256126ec9d876b63af6d41040f7 differ diff --git a/test/fixtures/b30ba256126ec9d876b63af6d41040f7.headers b/test/fixtures/b30ba256126ec9d876b63af6d41040f7.headers new file mode 100644 index 0000000..26567d4 --- /dev/null +++ b/test/fixtures/b30ba256126ec9d876b63af6d41040f7.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:51 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "303", + "x-ratelimit-reset": "1481671672", + "server": "Plack::Handler::Starlet", + "etag": "W/\"1d7b5d15c33f26aaa8f3a86e46daa6a1\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/f39bd3b5-6ead-4304-92b6-25023a572aa7?inc=ratings&fmt=json", + "time": 411, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/b781a2b3466da5a546a4ba978df0dce6 b/test/fixtures/b781a2b3466da5a546a4ba978df0dce6 new file mode 100644 index 0000000..b432e08 --- /dev/null +++ b/test/fixtures/b781a2b3466da5a546a4ba978df0dce6 @@ -0,0 +1 @@ +{"disambiguation":"","type":"Song","attributes":[],"id":"12b53203-64af-3a94-b3ec-11fad7c7d809","rating":{"votes-count":1,"value":4},"language":"eng","type-id":"f061270a-2fd6-32f1-a641-f0f8676d14e6","iswcs":["T-070.202.324-2"],"title":"War Pigs"} \ No newline at end of file diff --git a/test/fixtures/b781a2b3466da5a546a4ba978df0dce6.headers b/test/fixtures/b781a2b3466da5a546a4ba978df0dce6.headers new file mode 100644 index 0000000..1f27c6c --- /dev/null +++ b/test/fixtures/b781a2b3466da5a546a4ba978df0dce6.headers @@ -0,0 +1,27 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:35 GMT", + "content-type": "application/json; charset=utf-8", + "content-length": "245", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "365", + "x-ratelimit-reset": "1481671656", + "server": "Plack::Handler::Starlet", + "etag": "\"dd892f3364cb19dd485beaac347f2050\"", + "access-control-allow-origin": "*" + }, + "url": "http://musicbrainz.org:80/ws/2/work/12b53203-64af-3a94-b3ec-11fad7c7d809?inc=ratings&fmt=json", + "time": 598, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/b9875f70a8e288e37b773cc13d32ec30 b/test/fixtures/b9875f70a8e288e37b773cc13d32ec30 new file mode 100644 index 0000000..4931f80 Binary files /dev/null and b/test/fixtures/b9875f70a8e288e37b773cc13d32ec30 differ diff --git a/test/fixtures/b9875f70a8e288e37b773cc13d32ec30.headers b/test/fixtures/b9875f70a8e288e37b773cc13d32ec30.headers new file mode 100644 index 0000000..a1f145c --- /dev/null +++ b/test/fixtures/b9875f70a8e288e37b773cc13d32ec30.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:46 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "135", + "x-ratelimit-reset": "1481671666", + "server": "Plack::Handler::Starlet", + "etag": "W/\"b2b7f8758b961c96fbbe31d96afc9db9\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/590538e9-b183-4163-ab5a-171fb021ed12?inc=ratings&fmt=json", + "time": 457, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b b/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b new file mode 100644 index 0000000..752e5c8 Binary files /dev/null and b/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b differ diff --git a/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b.headers b/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b.headers new file mode 100644 index 0000000..4535a2b --- /dev/null +++ b/test/fixtures/bfd061a64b7aa63058ee3c14ddac6e6b.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:46 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "134", + "x-ratelimit-reset": "1481671666", + "server": "Plack::Handler::Starlet", + "etag": "W/\"1e1ae4bdee078805a5520696b613b4f3\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/4d89954f-0df0-41ef-9933-e7c022841719?inc=ratings&fmt=json", + "time": 413, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8 b/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8 new file mode 100644 index 0000000..416d654 Binary files /dev/null and b/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8 differ diff --git a/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8.headers b/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8.headers new file mode 100644 index 0000000..6bd26ff --- /dev/null +++ b/test/fixtures/c7d3ce37fac463c8977f395759e7a8e8.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:41 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "458", + "x-ratelimit-reset": "1481671662", + "server": "Plack::Handler::Starlet", + "etag": "W/\"84d60e2db30beeba777c583c5f46b3f8\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/f736efca-c021-4c87-999d-82d47279f29e?inc=ratings&fmt=json", + "time": 395, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/c8682c07b872491317ff6129e993354b b/test/fixtures/c8682c07b872491317ff6129e993354b new file mode 100644 index 0000000..f6babcb Binary files /dev/null and b/test/fixtures/c8682c07b872491317ff6129e993354b differ diff --git a/test/fixtures/c8682c07b872491317ff6129e993354b.headers b/test/fixtures/c8682c07b872491317ff6129e993354b.headers new file mode 100644 index 0000000..cb5bf47 --- /dev/null +++ b/test/fixtures/c8682c07b872491317ff6129e993354b.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:35 GMT", + "content-type": "application/json; charset=UTF-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "361", + "x-ratelimit-reset": "1481671656", + "last-modified": "Tue, 13 Dec 2016 23:16:58 GMT", + "server": "Jetty(9.3.10.v20160621)", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label?inc=ratings&query=Fin%20Records&fmt=json", + "time": 802, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e b/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e new file mode 100644 index 0000000..92b414c Binary files /dev/null and b/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e differ diff --git a/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e.headers b/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e.headers new file mode 100644 index 0000000..7278aea --- /dev/null +++ b/test/fixtures/d748efa553f827a4594baf0f3cd2bd0e.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:08 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "108", + "x-ratelimit-reset": "1481671688", + "server": "Plack::Handler::Starlet", + "etag": "W/\"05de0d70cc8c60f22498c500d2695695\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/release-group/f86eb0a9-fd04-48c9-810b-1ba0b006e7b4?inc=ratings&fmt=json", + "time": 402, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/dccbe1460fc101f36eea06bbb408df95 b/test/fixtures/dccbe1460fc101f36eea06bbb408df95 new file mode 100644 index 0000000..d292873 Binary files /dev/null and b/test/fixtures/dccbe1460fc101f36eea06bbb408df95 differ diff --git a/test/fixtures/dccbe1460fc101f36eea06bbb408df95.headers b/test/fixtures/dccbe1460fc101f36eea06bbb408df95.headers new file mode 100644 index 0000000..3d7799b --- /dev/null +++ b/test/fixtures/dccbe1460fc101f36eea06bbb408df95.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:46 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "144", + "x-ratelimit-reset": "1481671666", + "server": "Plack::Handler::Starlet", + "etag": "W/\"e0c30a6f31d6bc08657835e4c1dc4587\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/d81c44d0-e486-4db4-b128-e070a2b720f0?inc=ratings&fmt=json", + "time": 408, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e b/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e new file mode 100644 index 0000000..3f530ea Binary files /dev/null and b/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e differ diff --git a/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e.headers b/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e.headers new file mode 100644 index 0000000..03eeae9 --- /dev/null +++ b/test/fixtures/df91c1a5ada46ccb958bf4837b5e780e.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:41 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "454", + "x-ratelimit-reset": "1481671662", + "server": "Plack::Handler::Starlet", + "etag": "W/\"2be88120dbac41d0c98ac8e0773eba3d\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/600f2b3a-ca69-469b-b5fa-d7e926e55779?inc=ratings&fmt=json", + "time": 406, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/e31ec81b50d41606cac51117ade069e5 b/test/fixtures/e31ec81b50d41606cac51117ade069e5 new file mode 100644 index 0000000..48e4ba5 Binary files /dev/null and b/test/fixtures/e31ec81b50d41606cac51117ade069e5 differ diff --git a/test/fixtures/e31ec81b50d41606cac51117ade069e5.headers b/test/fixtures/e31ec81b50d41606cac51117ade069e5.headers new file mode 100644 index 0000000..80ee4dc --- /dev/null +++ b/test/fixtures/e31ec81b50d41606cac51117ade069e5.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:08 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "122", + "x-ratelimit-reset": "1481671688", + "server": "Plack::Handler::Starlet", + "etag": "W/\"cbc5bac79c22552d56d21a2a979b5abc\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/225e2add-bfe5-41c8-a0ac-29c102723efb?inc=ratings&fmt=json", + "time": 386, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/e68093f6dd838e18194ecc59cddf668c b/test/fixtures/e68093f6dd838e18194ecc59cddf668c new file mode 100644 index 0000000..f3792b8 Binary files /dev/null and b/test/fixtures/e68093f6dd838e18194ecc59cddf668c differ diff --git a/test/fixtures/e68093f6dd838e18194ecc59cddf668c.headers b/test/fixtures/e68093f6dd838e18194ecc59cddf668c.headers new file mode 100644 index 0000000..134e184 --- /dev/null +++ b/test/fixtures/e68093f6dd838e18194ecc59cddf668c.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:27:51 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "304", + "x-ratelimit-reset": "1481671672", + "server": "Plack::Handler::Starlet", + "etag": "W/\"2a9cee84408f8a118d0d1f7396bf73b2\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/4f086bbd-94fc-4957-b5b2-f56e05191aaf?inc=ratings&fmt=json", + "time": 402, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2 b/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2 new file mode 100644 index 0000000..8f661b3 Binary files /dev/null and b/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2 differ diff --git a/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2.headers b/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2.headers new file mode 100644 index 0000000..a54ec6d --- /dev/null +++ b/test/fixtures/fed3b13d36aab825c79fb4c130a10ca2.headers @@ -0,0 +1,29 @@ +{ + "statusCode": 200, + "headers": { + "date": "Tue, 13 Dec 2016 23:28:02 GMT", + "content-type": "application/json; charset=utf-8", + "transfer-encoding": "chunked", + "connection": "keep-alive", + "keep-alive": "timeout=15", + "vary": "Accept-Encoding", + "x-ratelimit-limit": "700", + "x-ratelimit-remaining": "591", + "x-ratelimit-reset": "1481671684", + "server": "Plack::Handler::Starlet", + "etag": "W/\"9c086a9b5adfde844bdff3727eec5cca\"", + "access-control-allow-origin": "*", + "content-encoding": "gzip" + }, + "url": "http://musicbrainz.org:80/ws/2/label/bacd5173-3e6a-4eb3-acec-dfbdc99aa4a6?inc=ratings&fmt=json", + "time": 393, + "request": { + "method": "GET", + "headers": { + "User-Agent": "graphbrainz/4.4.0 ( https://github.com/exogen/graphbrainz )", + "host": "musicbrainz.org", + "accept-encoding": "gzip, deflate", + "accept": "application/json" + } + } +} \ No newline at end of file diff --git a/test/schema.js b/test/schema.js index e0838da..16e1452 100644 --- a/test/schema.js +++ b/test/schema.js @@ -826,3 +826,84 @@ test('throws an error if looking up a URL without an argument', testError, ` `, (t, errors) => { t.is(errors[0].message, 'Lookups by a field other than MBID must provide: resource') }) + +test('some entities support ratings', testData, ` + { + lookup { + event(mbid: "eec75a81-8864-4cea-b8b4-e99cd08b29f1") { + rating { + voteCount + value + } + } + work(mbid: "12b53203-64af-3a94-b3ec-11fad7c7d809") { + rating { + voteCount + value + } + } + } + browse { + artists(work: "8a25ce1e-8695-42c0-b668-8f0aa057c72b") { + edges { + node { + rating { + voteCount + value + } + } + } + } + recordings(artist: "c8da2e40-bd28-4d4e-813a-bd2f51958ba8") { + edges { + node { + rating { + voteCount + value + } + } + } + } + } + search { + labels(query: "Fin Records") { + edges { + node { + rating { + voteCount + value + } + } + } + } + releaseGroups(query: "arid:c8da2e40-bd28-4d4e-813a-bd2f51958ba8") { + edges { + node { + rating { + voteCount + value + } + } + } + } + } + } +`, (t, data) => { + const { event, work } = data.lookup + const artists = data.browse.artists.edges.map(edge => edge.node) + const recordings = data.browse.recordings.edges.map(edge => edge.node) + const labels = data.search.labels.edges.map(edge => edge.node) + const releaseGroups = data.search.releaseGroups.edges.map(edge => edge.node) + t.is(event.rating.voteCount, 0) + t.is(event.rating.value, null) + t.true(work.rating.voteCount > 0) + t.true(work.rating.value >= 4) + t.true(artists.some(artist => artist.rating.voteCount > 0)) + t.true(artists.some(artist => artist.rating.value > 3)) + t.true(recordings.some(recording => recording.rating.voteCount > 0)) + t.true(recordings.some(recording => recording.rating.value > 3)) + t.true(labels.some(label => label.rating.voteCount > 0)) + t.true(labels.some(label => label.rating.value > 3)) + t.true(releaseGroups.some(releaseGroup => releaseGroup.rating.voteCount > 0)) + t.true(releaseGroups.some(releaseGroup => releaseGroup.rating.value > 3)) +})