Coder Social home page Coder Social logo

groove-api-sdk-csharp's Introduction

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Groove API SDK for CSharp

Integrate the Groove API into your C# project!

The Groove API SDK is built as a Portable Class Library and targets the following frameworks:

  • .NET 4.5
  • .NET for Windows Store apps
  • Windows Phone 8.1 and higher

Running the sample application

You will need to associate the application with your Microsoft Developer Center account. Go to the Microsoft Developer Center and create a new application if you don't already have one. The name you choose will be reserved for your application during development.

Then, copy the Package.appxmanifest file (under /samples) at the root of the GrooveApiUniversalSamples project (/samples/UniversalApplication)

Finally, in Visual Studio 2015/2017, you will need to associate your application to the one reserved on the Microsoft Developer Center. To do that, simply right-click on your project and select "Store -> Associate App with the Store...", select your application in the drop-down and follow the steps.

groove-api-sdk-csharp's People

Contributors

bastte avatar bfreydier avatar msftgits avatar sakley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

groove-api-sdk-csharp's Issues

Artist Id appears incorrect when browsing collection

Hi,
I am trying to write some code that matches new releases with artists in my current collection.
The code is working but there appears to be a mismatch in the Artist.Id from the browse ContenetResponse.
I took Bon Jovi as an example.
When an album appeared in the New Releases endpoint I got the following id:
music.790F0000-0200-11DB-89CA-0019B92A3933
This appears correct and is the same Id shown in the address bar when browsing this artist on the Groove Web Player.
However when I get the content response it shows the following Id:
music.AQILAAAPeQACYm9-5tsBoRw
This is a very different looking Id to any others I have encountered and obviously does not match the one above.
To further add to this the Artist that is downloaded does appear to have the correct Id in its ImageUrl and its Deep Link.
I have added a screen shot showing this. Now I can code around this by getting the Id from the ImageUrl instead but what is the reason for the short Id here and is it a bug?
I have checked multiple artists and they are all showing the wrong (or at least unexpected) Id when using browse.
Cheers
2017-01-25_li

Playlist fetched for any mood is the same.

Tested using the test method BrowsePlaylistsByMoodOrActivity.

For all mood type like "Happy", "Chill" etc, the returned playlists are same and the image url for all return 404.

Release library as Nuget Package

While it is great you have an SDK here it would be useful to have it released on Nuget.org as a package (ideally a .Net Standard one) so that updates can easily be consumed. If it is already available on Nuget perhaps you could put it up under releases.

Is user auth through v2.0 endpoint supported?

Hi,

I'm working on a desktop app that will integrate with Groove. I am currently trying to use MSAL for user authentication. The authentication process seems to go successfully, but when using the obtained token for Groove API calls, I see "INVALID_AUTHORIZATION_HEADER" error.

Does this mean that I cannot use MSAL to obtain a user token that would work with Groove API?

It's possible I am providing the wrong scope for the token request. However, if I provide the scope of "MicrosoftMediaService.GrooveApiAccess" to the PublicClientApplication when getting a token, the login pop up hits the following error:

AADSTS70011: The provided value for the input parameter 'scope' is not valid. The scope MicrosoftMediaServices.GrooveApiAccess openid email profile offline_access is not valid.

Here is my code for obtaining the token from my implementation of IUserTokenManager, using PublicClientApplication from MSAL:

public async Task<string> GetUserAuthorizationHeaderAsync(bool forceRefresh = false)
{
    string clientId = "MyClientId"
    string[] scope = new string[]{ clientId }; // Is this the correct scope?
    PublicClientApplication app = new PublicClientApplication(clientId);
    AuthenticationResult result = await app.AcquireTokenAsync(scope); // result.Token looks like a valid token
    return (result != null && result.Token != null) ? $"Bearer {result.Token}": null;
}

Sample missing files?

Error Task 'ValidateAppxManifestItems' failed. Could not find file 'S:\Windows-universal-samples-master\groove-api-sdk-csharp-master\samples\UniversalApplication\Package.appxmanifest'. GrooveApiUniversalSamples

How to do a combined Artist / Track search?

I have been trying, without success to do a combined search for Artist and Track.
Let's say I want to find the Album on which a specific song appears, e.g. Artist "Michael Jackson", Track: "Human Nature".

Sure, one could do 2 requests, 1 for the artist and one for the tracks, but especially for the tracks one would need to do an "infinite" maxItems (since there could be potentially thousands of matching tracks) and then try to match the track to the artist.
Not very efficient.

How can I do a single Search request to find that?

The Amazon API is capable of this, by searching with the term "Michael Jackson - Human Nature".

Any ideas or suggestions?

Unsupported file type

When signed in, it's impossible to play songs. It just says it's an "unsupported file type". I've tested on two separate machines, using both this app and my own testing app.

How tu use token

Hi folks !

First of all, thank you very much ! I'm currently trying to use you lib for Asp.net core application and this works quite well, except the fact that I don't understand how to use the token authentication ...

Can you help me please ?

Thank you,
Olivier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.