MN Open: API Implementation Guide November 2009
Total Page:16
File Type:pdf, Size:1020Kb
MN Open: API Implementation Guide November 2009 Table of Contents MN Open: API Implementation Guide ........................................................................................................... 1 Introduction ................................................................................................................................................. 4 Security: Customer Authentication and Encryption ............................................................................... 5 Transaction Options ............................................................................................................................... 5 Credit Card Payments............................................................................................................................ 5 Account Balance Payments ................................................................................................................... 6 Pricing, Required Retail Price and Tax Handling .................................................................................. 6 Territory Restriction ................................................................................................................................ 7 Album / Track revocation ....................................................................................................................... 7 Bitrate information .................................................................................................................................. 7 MN Open API Best Practices Checklist ................................................................................................. 9 MN Open API Metadata ....................................................................................................................... 10 The MN Open APIs .................................................................................................................................... 11 MN Open API Package and Method Overview ................................................................................... 14 Global Parameters ............................................................................................................................... 16 Paging .................................................................................................................................................. 16 Generating Signatures with your Shared Secret ................................................................................. 16 Tips for Methods That Require a POST Body ..................................................................................... 17 Streaming Samples with Flash: RESOURCE and LOCATION ........................................................... 18 PHP, cUrl, and Content-type Header Setting ...................................................................................... 18 Download Locations and Single Download ......................................................................................... 18 Environments: Integration (IE) and Production (PROD) ...................................................................... 19 How to Search for International Language Data ................................................................................. 19 Handling Album-only Tracks ................................................................................................................ 21 Friendly Filenames ............................................................................................................................... 21 Image Data .......................................................................................................................................... 21 Common Response Data Elements .................................................................................................... 21 Common Errors .................................................................................................................................... 25 Content Discovery ................................................................................................................................ 27 Search.GetTracks ............................................................................................................................ 27 Search.GetAlbums ........................................................................................................................... 28 Search.GetArtists ............................................................................................................................. 29 Search.GetGeoLocation ................................................................................................................... 29 Search.ContentMatch....................................................................................................................... 30 Track.Get .......................................................................................................................................... 31 Track.GetLocations .......................................................................................................................... 31 Album.GetTracks .............................................................................................................................. 32 Artist.GetAlbums .............................................................................................................................. 33 Artist.GetTracks ................................................................................................................................ 34 Label.GetLabelOwner ...................................................................................................................... 33 Provisioning ......................................................................................................................................... 36 User.Create ...................................................................................................................................... 36 User.Get ........................................................................................................................................... 37 User.IsUsernameAvailable ............................................................................................................... 38 User.Login - DEPRECATED ............................................................................................................ 38 User.SetPassword ............................................................................................................................ 39 User.Update ..................................................................................................................................... 40 Cart.AddItems .................................................................................................................................. 41 Cart.Clear ......................................................................................................................................... 43 MediaNet Digital Confidential Page 1 of 126 Cart.Get ............................................................................................................................................ 43 Cart.GetCartByUser ......................................................................................................................... 44 Cart.GetDownloadLocations ............................................................................................................ 44 Cart.Purchase .................................................................................................................................. 45 Cart.RemoveItems ........................................................................................................................... 47 Purchase.UseBalance ...................................................................................................................... 48 Purchase.UseCreditCard ................................................................................................................. 51 Management ........................................................................................................................................ 55 Partner.GetAMGData ....................................................................................................................... 55 Partner.GetBalance .......................................................................................................................... 56 Partner.RefillBalance........................................................................................................................ 56 Report.GetOrderHistory ................................................................................................................... 58 Use Cases .................................................................................................................................................. 59 Typical API calls including request and responses ............................................................................. 60 SEARCH MANAGEMENET USE CASES ....................................................................................... 60 API Calls detailed in this section: ..................................................................................................... 60 Search.GetArtists .................................................................................................................... 60 Search.GetAlbums .................................................................................................................