Skip to content

Commit

Permalink
Add apple podcasts URL to podcast graph object
Browse files Browse the repository at this point in the history
  • Loading branch information
hedgehog1029 committed Jan 13, 2022
1 parent 6ad639b commit 5102438
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,17 @@ def resolve_articles(self, info):
class HasExternalLinks(graphene.Interface):
spotify_url = graphene.String(required=False)
rss_url = graphene.String(required=False)
apple_url = graphene.String(required=False)

def resolve_spotify_url(self, info):
return self.external_urls.get('spotify', None)

def resolve_rss_url(self, info):
return self.external_urls.get('rss', None)

def resolve_apple_url(self, info):
return self.external_urls.get('apple', None)

class PodcastEpisode(graphene.ObjectType):
title = graphene.String()
description = graphene.String()
Expand Down

0 comments on commit 5102438

Please sign in to comment.