Skip to content

Repository for CS361 - Software Engineering 1 at OSU

Notifications You must be signed in to change notification settings

skylarposler/CS361

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CS361

Repository for CS361 - Software Engineering 1 at OSU

Microservice Portion - Must have the PokePicker running on your local machine
** This microservice utilizes this json file: https://github.com/Purukitto/pokemon-data.json and it must be saved on your local PC

Requesting Data:

Step 1. Make sure you're in the same directory as the pokepicker file and the pokemon-data.json
Step 2. Run pokepicker.py - the get_pokemon_micro is the specific function for the microservice
Step 3. Be sure to enter the correct path for the text file

Example Call:

def run_microservice():
  """runs the microservice"""
  
    while True:
        with open("microservice.txt", "r+") as file:
            line  = file.readline()

        if line == "request":
            pokemon = get_pokemon_micro() # calls the microservice
            outfile = open("microservice.txt", 'w')
            poke_name = pokemon.strip('"')
            outfile.write(poke_name)
            outfile.close()
            
run_microservice()

Recieving Data:

Step 1. After request is written in the microservice.txt file, the function above will overwrite it with a random pokemon name
Step 2. The pokemon name will be returned and available to be used at will.

UML Diagram

image

About

Repository for CS361 - Software Engineering 1 at OSU

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages