예제 #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()