Re: Help with 400 Bad Request

Ian McEwen <[email protected]> Sun, 15 Feb 2015 23:19:53 -0700
Newsgroups gmane.comp.audio.musicbrainz.devel
Message-ID <[email protected]>
On Sun, Feb 15, 2015 at 10:03:02PM -0800, Joe Martinez wrote:
> On Sat, Feb 14, 2015 at 9:46 PM, Ian McEwen <[email protected]>
> wrote:
>
> > On Sat, Feb 14, 2015 at 09:20:03PM -0800, Joe Martinez wrote:
> > > Ian,
> > >
> > > Thanks for the response.  See my responses below...
> > >
> > > On Sat, Feb 14, 2015 at 7:47 PM, Ian McEwen <
> > [email protected]>
> > > wrote:
> > >
> > > > I'm looking now.
> > > >
> > > > The only thing that stands out to me is that ratings are numbers
> > > > between 0 and 100. I'm assuming you meant four stars, which would be
> > 80,
> > > > not 4.
> > > >
> > >
> > > Yes, I was doing it based on a 0-5 rating.  I did that based on this
> > page:
> > >
> > > https://musicbrainz.org/doc/Rating_System
> > >
> > > Do you know why it says 0-5, when it's really 0-100?  Or, is that page
> > > talking about something altogether different?
> > >
> >
> > It's somewhat misleading -- the site only lets people set multiples of
> > 20 (i.e., 1-5 "stars"), but on the backend it's 1-100.
> >
> > https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2#ratings
> > is fairly sparse but as you can see the example uses 20, which is
> > clearly not 1-5.
> >
> >
> Strangely, now that I have stored a rating, when I read it back using the
> XML web service (using ?inc=user-ratings), it sends me back a 1-5 rating.
> So, if I send 80, then query it back, it comes back to me as 4.  Doesn't
> seem very consistent.  So, I guess I have to do the scaling back and forth
> in code on my end?
>

That seems to be the case. Argh :(

The inc=user-ratings can apparently return decimal values as well, e.g.
if I pass '5' to /ws/2/rating when rating, it'll return 0.25 with
inc=user-ratings.

> -Joe

> _______________________________________________
> MusicBrainz-devel mailing list
> [email protected]
> http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel

_______________________________________________
MusicBrainz-devel mailing list
[email protected]
http://lists.musicbrainz.org/mailman/listinfo/musicbrainz-devel
signature.asc (application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlThjAYACgkQq+0avXExp2822gCeLBAb/JHtQkz3gYMTSP4qWR0N
IHsAoIWo8u/fJS9UMZZiCdAh8AXNcSro
=xcs+
-----END PGP SIGNATURE-----