Added create_skill to spotify skill and wikipedia

This commit is contained in:
Mathieu B 2021-07-30 12:28:42 +02:00
parent 9be10ee6c5
commit 572e89794a
2 changed files with 9 additions and 1 deletions

View File

@ -35,6 +35,10 @@ class SpotifySkill(Skill, metaclass=SkillRegistering):
song_name = current_playback['item']['name'] song_name = current_playback['item']['name']
artist = current_playback['item']['artists'][0]['name'] artist = current_playback['item']['artists'][0]['name']
print(song_name + " from " + artist ) print(song_name + " from " + artist)
print("[INFO INTENT] - Current playback : music for Spotify") print("[INFO INTENT] - Current playback : music for Spotify")
def create_skill():
return SpotifySkill()

View File

@ -11,3 +11,7 @@ class WikipediaSkill(Skill, metaclass=SkillRegistering):
@intent_handler(IntentBuilder("WikipediaQueryIntent").require("Wikipedia").require("ArticleTitle")) @intent_handler(IntentBuilder("WikipediaQueryIntent").require("Wikipedia").require("ArticleTitle"))
def handle_wikipedia_query_intent(self, data): def handle_wikipedia_query_intent(self, data):
print("Handle Wikipedia Query Intent Method") print("Handle Wikipedia Query Intent Method")
def create_skill():
return WikipediaSkill()