Example #1
0
def single_character(character_id):
	character = get_single_character(character_id)
	comic_name_list = []
	for comic_url in character['data']['results'][0]['comics']['items']:
		m = re.match(".+/(?P<comic_id>\d+)", comic_url['resourceURI'])
		single_comic_name = get_single_comic(m.group("comic_id"))
		comic_name_list.append(single_comic_name)

	url_list = []
	for character_url in character['data']['results'][0]['urls']:
		url_list.append(character_url)
	return render_template('character.html', title=character['data']['results'][0]['name'], character=character, comic_name_list=comic_name_list, url_list=url_list) #TODO: get title of page from character object/call
Example #2
0
def single_comic(comic_id):
	comic = get_single_comic(comic_id)
	character_name_list = []
	for character_url in comic['data']['results'][0]['characters']['items']:
		m = re.match(".+/(?P<character_id>\d+)", character_url['resourceURI'])
		single_character_name = get_single_character(m.group("character_id"))
		character_name_list.append(single_character_name)

	url_list = []
	for comic_url in comic['data']['results'][0]['urls']:
		url_list.append(comic_url)
	return render_template('comic.html', title=comic['data']['results'][0]['title'], comic=comic, character_name_list=character_name_list, url_list=url_list)
Example #3
0
def single_comic(comic_id):
    comic = get_single_comic(comic_id)
    character_name_list = []
    for character_url in comic['data']['results'][0]['characters']['items']:
        m = re.match(".+/(?P<character_id>\d+)", character_url['resourceURI'])
        single_character_name = get_single_character(m.group("character_id"))
        character_name_list.append(single_character_name)

    url_list = []
    for comic_url in comic['data']['results'][0]['urls']:
        url_list.append(comic_url)
    return render_template('comic.html',
                           title=comic['data']['results'][0]['title'],
                           comic=comic,
                           character_name_list=character_name_list,
                           url_list=url_list)
Example #4
0
def single_character(character_id):
    character = get_single_character(character_id)
    comic_name_list = []
    for comic_url in character['data']['results'][0]['comics']['items']:
        m = re.match(".+/(?P<comic_id>\d+)", comic_url['resourceURI'])
        single_comic_name = get_single_comic(m.group("comic_id"))
        comic_name_list.append(single_comic_name)

    url_list = []
    for character_url in character['data']['results'][0]['urls']:
        url_list.append(character_url)
    return render_template(
        'character.html',
        title=character['data']['results'][0]['name'],
        character=character,
        comic_name_list=comic_name_list,
        url_list=url_list)  #TODO: get title of page from character object/call
Example #5
0
def single_series(series_id):
    series = get_single_series(series_id)
    character_name_list = []
    for character_url in series['data']['results'][0]['characters']['items']:
        m = re.match(".+/(?P<character_id>\d+)", character_url['resourceURI'])
        single_character_name = get_single_character(m.group("character_id"))
        character_name_list.append(single_character_name)

    comic_name_list = []
    for comic_url in series['data']['results'][0]['comics']['items']:
        m = re.match(".+/(?P<comic_id>\d+)", comic_url['resourceURI'])
        single_comic_name = get_single_comic(m.group("comic_id"))
        comic_name_list.append(single_comic_name)

    creator_name_list = []
    for creator_url in series['data']['results'][0]['creators']['items']:
        m = re.match(".+/(?P<creator_id>\d+)", creator_url['resourceURI'])
        single_creator_name = get_single_creator(m.group("creator_id"))
        creator_name_list.append(single_creator_name)

    event_name_list = []
    for event_url in series['data']['results'][0]['events']['items']:
        m = re.match(".+/(?P<event_id>\d+)", event_url['resourceURI'])
        single_event_name = get_single_event(m.group("event_id"))
        event_name_list.append(single_event_name)

    # story_name_list = []
    # for story_url in series['data']['results'][0]['stories']['items']:
    # 	m = re.match(".+/(?P<story_id>\d+)", story_url['resourceURI'])
    # 	single_story_name = get_single_story(m.group("story_id"))
    # 	creator_story_list.append(single_story_name)

    url_list = []
    for series_url in series['data']['results'][0]['urls']:
        url_list.append(series_url)
    return render_template('series.html',
                           title="Title goes here",
                           series=series,
                           character_name_list=character_name_list,
                           comic_name_list=comic_name_list,
                           creator_name_list=creator_name_list,
                           event_name_list=event_name_list,
                           url_list=url_list)
Example #6
0
def single_series(series_id):
	series = get_single_series(series_id)
	character_name_list = []
	for character_url in series['data']['results'][0]['characters']['items']:
		m = re.match(".+/(?P<character_id>\d+)", character_url['resourceURI'])
		single_character_name = get_single_character(m.group("character_id"))
		character_name_list.append(single_character_name)

	comic_name_list = []
	for comic_url in series['data']['results'][0]['comics']['items']:
		m = re.match(".+/(?P<comic_id>\d+)", comic_url['resourceURI'])
		single_comic_name = get_single_comic(m.group("comic_id"))
		comic_name_list.append(single_comic_name)

	creator_name_list = []
	for creator_url in series['data']['results'][0]['creators']['items']:
		m = re.match(".+/(?P<creator_id>\d+)", creator_url['resourceURI'])
		single_creator_name = get_single_creator(m.group("creator_id"))
		creator_name_list.append(single_creator_name)

	event_name_list = []
	for event_url in series['data']['results'][0]['events']['items']:
		m = re.match(".+/(?P<event_id>\d+)", event_url['resourceURI'])
		single_event_name = get_single_event(m.group("event_id"))
		event_name_list.append(single_event_name)

	# story_name_list = []
	# for story_url in series['data']['results'][0]['stories']['items']:
	# 	m = re.match(".+/(?P<story_id>\d+)", story_url['resourceURI'])
	# 	single_story_name = get_single_story(m.group("story_id"))
	# 	creator_story_list.append(single_story_name)

	url_list = []
	for series_url in series['data']['results'][0]['urls']:
		url_list.append(series_url)
	return render_template('series.html', title="Title goes here", series=series, character_name_list=character_name_list, comic_name_list=comic_name_list, creator_name_list=creator_name_list, event_name_list=event_name_list, url_list=url_list)
Example #7
0
def single_character_api(character_id):
	return jsonify(get_single_character(character_id))
Example #8
0
def single_character_api(character_id):
    return jsonify(get_single_character(character_id))