- saveUser(name, token, facebookId, boolean)
saveUser
- getArtists(city)
getArtist gets Artists specifically from the inputted city
- getTracks(artist)
getTracks gets all the tracks from the artist
- checkArtistTable(name)
checkArtistTable checks the Artist table in the database whether the name exists
- checkUsersTable(facebookID)
checkUsersTable checks Users table in the database using his or her Facebook ID
- getChatrooms(userId)
getChatrooms gets all the messages between a specific user and their recipient from the Requested_Gigs table
- getCurrentUser(facebookId)
getCurrentUser gets the specified user from the Users table using their Facebook ID
- setFacebookId(facebookId)
setFacebookId - sets the Facebook ID state of current user that is logged in
- setCurrentUser(currentUser)
setCurrentUser sets state of current user that is logged in
- searchClickHandler(input)
searchClickHandler handles different inputs of cities
- onChange(input)
onChange handles change of text inside search bar
- setArtist(artist)
setArtist sets artist and tracks states of artist that was selected on the page using a POST request
- setTracks(tracks)
setTracks sets state of tracks
- onEnter(e) ⇒
null
onEnter enable enter key to trigger this.props.onClick which is a search handler function
- responseFacebook(response) ⇒
null
responseFacebook
- handleOpenModal() ⇒
handleOpenModal changes the showModal state to true to render the popup
- handleCloseModal() ⇒
handleCloseModal changes the showModal state to false to hide the popup
- onClickHandler(input) ⇒
onClickHandler make post request to sent he message to the artist.
- seed(knex, Promise) ⇒
Promise
seed This function is created with creating a seed with knex and is used to add starterdata into tables
- createSFArtist(knex, artist) ⇒
Promise
- createLAArtist(knex, artist) ⇒
Promise
- createNYArtist(knex, artist) ⇒
Promise
- createDate(knex, day) ⇒
Promise
- createSingle(knex, artist, id) ⇒
Promise
- createUser(knex, artist) ⇒
Promise
- up(knex, Promise) ⇒
Promise
up This will generate all the tables in the database
- down(knex, Promise) ⇒
Promise
saveUser
Kind: global function
Param | Type | Description |
---|---|---|
name | string |
name of user |
token | string |
token generated by Facebook when user logs in |
facebookId | string |
user's Facebook ID |
boolean | boolean |
true if artist, false if user |
getArtist gets Artists specifically from the inputted city
Kind: global function
Param | Type | Description |
---|---|---|
city | string |
city inputted by user |
getTracks gets all the tracks from the artist
Kind: global function
Param | Type | Description |
---|---|---|
artist | string |
name of artist |
checkArtistTable checks the Artist table in the database whether the name exists
Kind: global function
Param | Type | Description |
---|---|---|
name | string |
name of user that is passed in |
checkUsersTable checks Users table in the database using his or her Facebook ID
Kind: global function
Param | Type | Description |
---|---|---|
facebookID | string |
Facebook ID of user that is passed in |
getChatrooms gets all the messages between a specific user and their recipient from the Requested_Gigs table
Kind: global function
Param | Type | Description |
---|---|---|
userId | integer |
ID of the specified user that is fetched from the users table in the database |
getCurrentUser gets the specified user from the Users table using their Facebook ID
Kind: global function
Param | Type | Description |
---|---|---|
facebookId | string |
the user's facebookId |
up This will generate all the tables in the database
Kind: global function
Param | Type | Description |
---|---|---|
knex | Promise |
Helps execute SQL queries to create the tables |
Promise | Promise |
Ensures that all tables will be created |
Kind: global function
Returns: Promise
- Will drop all the tables if you need to rollback a migration
Param | Type | Description |
---|---|---|
knex | Promise |
Helps execute SQL queries |
Promise | Promise |
Was not needed |
seed This function is created with creating a seed with knex and is used to add starterdata into tables
Kind: global function
Returns: Promise
- This will populate the tables with initial data from artists
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
Promise | Promise |
This is a promise that will ensure that the tables will be populated |
Kind: global function
Returns: Promise
- Inserts an entry into the artist table for SF artists
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
artist | Object |
This object contains the artist's name, city, image, and uri |
Kind: global function
Returns: Promise
- Inserts an entry into the artist table for LA artists
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
artist | Object |
This object contains the artist's name, city, image, and uri |
Kind: global function
Returns: Promise
- Inserts an entry into the artist table for NY artists
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
artist | Object |
This object contains the artist's name, city, image, and uri |
Kind: global function
Returns: Promise
- Inserts a date entry into the date table
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
day | String |
This will be in the format of 'D/M' for all 365 days of the year |
Kind: global function
Returns: Promise
- Inserts an entry containing an artist's single and name into the single table
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
artist | String |
|
id | Number |
Kind: global function
Returns: Promise
- Inserts a user into the users table
Param | Type | Description |
---|---|---|
knex | Promise |
SQL builder |
artist | Object |
setFacebookId - sets the Facebook ID state of current user that is logged in
Kind: global function
Param | Type | Description |
---|---|---|
facebookId | string |
The Facebook ID that is returned from the database |
setCurrentUser sets state of current user that is logged in
Kind: global function
Param | Type | Description |
---|---|---|
currentUser | string |
the current user that is returned |
searchClickHandler handles different inputs of cities
Kind: global function
Param | Type | Description |
---|---|---|
input | string |
name of city that is typed in by the user |
onChange handles change of text inside search bar
Kind: global function
Param | Type | Description |
---|---|---|
input | string |
input from user into searchbar |
setArtist sets artist and tracks states of artist that was selected on the page using a POST request
Kind: global function
Param | Type | Description |
---|---|---|
artist | string |
artist that is selected by user |
setTracks sets state of tracks
Kind: global function
Param | Type | Description |
---|---|---|
tracks | array |
array of tracks returned from database |
onEnter enable enter key to trigger this.props.onClick which is a search handler function
Kind: global function
Param | Type | Description |
---|---|---|
e | object |
event object from key press on enter |
responseFacebook
Kind: global function
Param | Type |
---|---|
response | object |
handleOpenModal changes the showModal state to true to render the popup
handleCloseModal changes the showModal state to false to hide the popup
onClickHandler make post request to sent he message to the artist.
Kind: global function
Param | Type | Description |
---|---|---|
input | string |
message to be sent to artist from current user. |