Issue Details (XML | Word | Printable)

Key: MBS-4997
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Ian McEwen
Reporter: Paul Taylor
Votes: 2
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server
MBS-5578

Add lookup url to webservice

Created: 10/Jul/12 05:00 AM   Updated: 25/Feb/13 05:25 AM   Resolved: 25/Feb/13 05:25 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 2013-02-25

Issue Links:
Depends
 
Duplicate
 



Sort Order: Ascending order - Click to sort in descending order
Ian McEwen added a comment - 29/Jan/13 10:00 PM

Hate the perl code for the WS, so I haven't started on that part yet. But for the mmd-schema changes:

diff --git a/schema/musicbrainz_mmd-2.0.rng b/schema/musicbrainz_mmd-2.0.rng
index f4356d6..56f9ecd 100644
--- a/schema/musicbrainz_mmd-2.0.rng
+++ b/schema/musicbrainz_mmd-2.0.rng
@@ -64,6 +64,9 @@
                 <ref name="def_work-element"/>
             </optional>
             <optional>
+                <ref name="def_url-element"/>
+            </optional>
+            <optional>
                 <ref name="def_puid-element"/>
             </optional>
             <optional>
@@ -643,6 +646,25 @@
         </element>
     </define>
 
+    <define name="def_url-element">
+        <element name="url">
+            <optional>
+                <attribute name="id">
+                    <data type="anyURI"/>
+                </attribute>
+            </optional>
+
+            <optional>
+                <element name="resource">
+                    <text/>
+                </element>
+            </optional>
+            <zeroOrMore>
+                <ref name="def_relation-list"/>
+            </zeroOrMore>
+        </element>
+    </define>
+
 
     <define name="def_disc-element">
         <element name="disc">

Ian McEwen added a comment - 29/Jan/13 10:38 PM

https://github.com/metabrainz/musicbrainz-server/pull/63

okay, that was a lot less painful than my other webservice stuff, apparently I'm either getting better at this or this is an easy task for the webservice!


Ian McEwen added a comment - 29/Jan/13 10:41 PM

Noting, of course, that that loads URLs by MBID. Hopefully that's correct?


Nicholas J Humfrey added a comment - 21/Feb/13 12:21 PM

Example working on Beta:
https://beta.musicbrainz.org/ws/2/url?inc=artist-rels&resource=http://www.madonna.com/

Thanks Ian :-D