Exemplo n.º 1
0
def main():
    specific_endpoint = 'prefix'
    response = post_request.retrieval(specific_endpoint)

    prefix_array_dict = response.json()
    new_array = remove_strings_with_prefix(prefix_array_dict)

    return_value = {'array': new_array}
    post_request.validation(specific_endpoint, return_value)
Exemplo n.º 2
0
def main():
	specific_endpoint = 'haystack'
	response = post_request.retrieval(specific_endpoint)

	needle_in_haystack_dict = response.json()
	needle_index = locate_needle(needle_in_haystack_dict)

	return_value = {'needle' : needle_index}
	post_request.validation(specific_endpoint, return_value)
Exemplo n.º 3
0
def main():
    specific_endpoint = 'dating'
    response = post_request.retrieval(specific_endpoint)

    interval_datestamp_dict = response.json()
    new_datestamp = add_interval_to_datestamp(interval_datestamp_dict)

    return_value = {'datestamp': new_datestamp}
    post_request.validation(specific_endpoint, return_value)
Exemplo n.º 4
0
def main():
    specific_endpoint = 'reverse'
    response = post_request.retrieval(specific_endpoint)

    original_string = response.text
    reversed_string = reverse_string(original_string)

    return_value = {'string': reversed_string}
    post_request.validation(specific_endpoint, return_value)
Exemplo n.º 5
0
def main():
    specific_endpoint = 'register'
    return_value = {'github': registration_details['github']}
    post_request.validation(specific_endpoint, return_value)