コード例 #1
0
def randomep(inp):
    #"Shows a random episode of My Little Pony: Friendship is Magic"
    ep = ponyapi.random()

    seasonep = ""

    if ep[u"is_movie"]:
        seasonep = "(a movie)"
    else:
        seasonep = "(season %d episode %d)" % (ep[u"season"], ep[u"episode"])

    return "%s %s" % (ep[u"name"], seasonep)
コード例 #2
0
ファイル: pony.py プロジェクト: Xe/h2
def randomep(inp):
    #"Shows a random episode of My Little Pony: Friendship is Magic"
    ep = ponyapi.random()

    seasonep = ""

    if ep[u"is_movie"]:
        seasonep = "(a movie)"
    else:
        seasonep = "(season %d episode %d)" % (ep[u"season"], ep[u"episode"])

    return "%s %s" % (ep[u"name"], seasonep)
コード例 #3
0
ファイル: test.py プロジェクト: akaritakai/PonyAPI
 def test_random(self):
     ponyapi.random()
コード例 #4
0
 def test_random(self):
     ponyapi.random()