public IEnumerable <ExternalAPIEntry> ParseData(SoundCloudResult result)
        {
            List <ExternalAPIEntry> tableEntries = new List <ExternalAPIEntry>();

            foreach (Collection song in result.collection)
            {
                ExternalAPIEntry entry = new ExternalAPIEntry();

                entry.PartitionKey     = "SoundCloud";
                entry.RowKey           = song.permalink;
                entry.Title            = song.title;
                entry.ShortDescription = song.description;
                entry.URL = song.permalink_url;
                entry.UID = song.id.ToString();

                tableEntries.Add(entry);
            }

            return(tableEntries);
        }
Esempio n. 2
0
        public IEnumerable <ExternalAPIEntry> ParseData(StoryblokResult result)
        {
            List <ExternalAPIEntry> tableEntries = new List <ExternalAPIEntry>();

            foreach (Story story in result.stories)
            {
                ExternalAPIEntry entry = new ExternalAPIEntry();

                entry.PartitionKey     = "Storyblok";
                entry.RowKey           = story.slug;
                entry.Title            = story.name;
                entry.ShortDescription = story.content.shortdescription;
                entry.URL = "blog/" + story.slug;
                entry.UID = story.id.ToString();

                tableEntries.Add(entry);
            }

            return(tableEntries);
        }
        public IEnumerable <ExternalAPIEntry> ParseData(GitHubResult result)
        {
            List <ExternalAPIEntry> tableEntries = new List <ExternalAPIEntry>();

            foreach (Repo repo in result.Repos)
            {
                ExternalAPIEntry entry = new ExternalAPIEntry();

                entry.PartitionKey     = "GitHub";
                entry.RowKey           = repo.name;
                entry.Title            = repo.name;
                entry.ShortDescription = repo.description;
                entry.URL = repo.html_url;
                entry.UID = repo.id.ToString();

                tableEntries.Add(entry);
            }

            return(tableEntries);
        }