Skip to content

Commit

Permalink
appends persons occupation to youtube video searches
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandersimoes committed Jun 28, 2017
1 parent 6b7b52e commit 490a5f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/components/profile/person/MemMetrics.jsx
Expand Up @@ -11,7 +11,7 @@ class MemMetrics extends Component {

componentDidMount() {
const {person} = this.props;
axios.get(`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${person.name}&maxResults=1&type=video&videoEmbeddable=true&key=AIzaSyB0gtWcJ2moxtxdVGkC0WvIdFvQX4nRNPs`)
axios.get(`https://www.googleapis.com/youtube/v3/search?part=snippet&q=${person.name}%20${person.occupation.occupation}&maxResults=1&type=video&videoEmbeddable=true&key=AIzaSyB0gtWcJ2moxtxdVGkC0WvIdFvQX4nRNPs`)
.then(res => {
const vid = res.data.items[0];
this.setState({vid});
Expand Down
2 changes: 1 addition & 1 deletion app/components/profile/person/Person.jsx
Expand Up @@ -67,7 +67,7 @@ class Person extends Component {

const sections = [
{title: "Memorability Metrics", slug: "metrics", content: <MemMetrics pageviews={personProfile.pageviews} person={personProfile.person} />},
{title: "Related Videos from YouTube", slug: "related", content: <div onClick={e => { e.target.childNodes[0].style.pointerEvents = "all"; }}><iframe className="yasiv-youtube" src={`https://yasiv.com/youtube#?q=${personProfile.person.name}`} frameBorder="0" width="1024" height="600" /></div>},
{title: "Related Videos from YouTube", slug: "related", content: <div onClick={e => { e.target.childNodes[0].style.pointerEvents = "all"; }}><iframe className="yasiv-youtube" src={`https://yasiv.com/youtube#?q=${personProfile.person.name}%20${personProfile.person.occupation.occupation}`} frameBorder="0" width="1024" height="600" /></div>},
{
title: "Online Attention",
slug: "afterlife",
Expand Down

0 comments on commit 490a5f8

Please sign in to comment.