# Spreadsheet Automation 101 Lesson 4: OmdbAPI Parameter Picker

Get more things than just the poster and movie title by changing our script a bit. By creating different functions, we can get other data such as movie posters or directors.

Video Transcript

0:00 <affirmative>, can you feel that magic coming from our fingers? That absolute fire. We're, we're, we're spitting air. We're able to pick data from online, bring it inside of Google Sheets and we're able to programmatically like get it right based on this Titanic, right?
0:16 We can use Hackers is a cool title here. We can even do not just one word titles, but like jingle all the way here.
0:24 We get a poster of Jingle All the Way or Jingle all the way to we can guess movie titles and get the poster.
0:31 Wow, <laugh>. What's really fun too is we can get more things than just the poster, just the movie title, right?
0:38 We saw all of those options. If we do a little bit change to our script, now the first thing you might think about doing is creating different functions like get movie poster or get you know, director and then we just have to type in director for this poster director.
1:00 Okay? So let's just go grab the director and we can do this, right? We can get director a one and now we get the director.
1:10 Okay? Boom, we got the director. We got what Terminator as well. I think that's a James Cameron movie. No, Hernandez, I think it's, oh wait, the Terminator maybe is the real title.
1:23 The Terminator. There we go James Cameron. So that we are, we are able to do that if we create copy and paste the entire function.
1:33 But what if we could do that without copy and pasting the entire function and just call one thing. We are only changing this director or this poster, right?
1:42 So let's delete all of this and use the power of functions to change it. So we we're gonna do title per and we're gonna do get movie data and we're gonna pass this per parameter.
1:59 It's a shirt for short, for parameter as the variable for the values. So we're gonna save this use, get movie data and we're gonna get an error here cause there's no more get poster, but we don't need get poster anymore.
2:14 We're gonna get movie data, a one comma poster. Now we should be able to get the poster there. There we go.
2:24 And the director, instead of get director equals get movie data a one and in quotes we can do director. So this is pretty cool.
2:37 Now we have one function that we can call any number of times as long as we know what the parameters are of the J js o response, right?
2:45 We can ga gather any piece of data. Now that is pretty darn awesome. I really enjoy this. I hope you enjoy this too.
2:55 We are at the end of spreadsheet automation 1 0 1, but I have some more bonus lessons for you. I have some more information for you coming up soon.
3:06 Really, really cool. And thank you for joining me through this entire journey. I hope you learned how to code. I hope if you know how to code, you learned a little bit more about spreadsheets and spreadsheet automation.
3:17 We've put some triggers in all the way. We have time-based triggers. We have on edit, on open. We have all sorts of stuff at our disposal now.
3:27 But stick around. I have a few more bonus lessons for you to do a little bit more, get a little bit more out of your Google Sheets.
3:34 Bye.

Better Sheets