Beispiel #1
0
        /// <summary>
        /// Gets the current Situations. Suggestions
        /// </summary>
        /// <param name="situationType">The situation types you wish to receive</param>
        /// <returns>
        /// Information like:
        ///  - "Its Friday Morning..." : "Play Music for..."
        ///     - "Todays Biggest Hits"
        ///         - "Today's Dance Smashes"
        ///         - "Today's Pop Charts"
        ///         - "..."
        ///     - "Waking Up Happy"
        ///         - "Star Guitars"
        ///             - "Air Guitar Heroes"
        ///             - "..."
        ///         - "..."
        /// All Data above will also have <see cref="ArtReference"/>'s for each station / situation
        /// </returns>
        //TODO (Low): Find out what situation types exist
        //TODO (Medium): Convert the int[] to a SituationType[]
        public async Task <ListListenNowSituationResponse> ListListenNowSituationsAsync(params int[] situationType)
        {
            if (!CheckSession())
            {
                return(null);
            }
            if (situationType == null)
            {
                situationType = new[] { 1 };
            }
            var requestData = new ListListenNowSituationsRequest(Session)
            {
                RequestSignals = new RequestSignal(RequestSignal.GetTimeZoneOffsetSecs()),
                SituationType  = situationType
            };

            var request = MakeRequest <ListListenNowSituations>();
            var data    = await request.GetAsync(requestData);

            return(data);
        }
 public ListListenNowSituationsRequest(Session session) : base(session)
 {
     SituationType  = new[] { 1 };
     RequestSignals = new RequestSignal(RequestSignal.GetTimeZoneOffsetSecs());
 }