async postAppOpen(params = {}) {
    const headers = this.getHeaders()
    const { context = {} } = params || {}
    const auxContext = this.populateContext(context || {})
    delete auxContext.sessionId
    try {
      const response = await axios({
        url: `${SNGCLP_API_URL}/events/open`,
        method: 'post',
        headers,
        data: { context: auxContext },
        timeout: this.config.timeout || 0,
        responseType: 'json',
        responseEncoding: 'utf8',
        maxRedirects: 5,
        proxy: this.config.proxy || null,
      })

      const { data = {}, status } = response && response.data ? response.data : {}

      if (data.context) {
        this.sessionId = data.context.sessionId
      }
      if (status !== 'success') {
        throw new Error(`[Songclip][postAppOpen] ${JSON.stringify(data || {} )}`)
      }
      return response.data || false
    } catch (error) {
      throw new Error(`[Songclip][postAppOpen] ${error}`)
    }
  }
/**
   * Sends an open "App" event.
   *
   * Sends an open "App" event when the "Songclip" content is first used in the user's session.
   * It is usually related to a button that enables the songclip content to be surfaced in the current user's session.
   *
   * @link https://songclip.docs.apiary.io/#reference/0/events/send-app-open-event
   *
   * @param {Object} params.context         Context for call
   * @param {string} params.sourcePlatform  Source platform, default 'web', other: 'iOS', 'Android', etc.
   * @param {string} params.uniqueId        Anonimized ID for user, to keep context for future calls. If not set, one is generated.
   * @param {string} params.sessionId       ID for current session (identifier to group calls done from a user in a period of time defined by partner) 
   *                                        If not set, will use one coming from the first response.
   * @return {Object|boolean} response object { status: string } or false if unsuccessful call, status = 'success' if call is OK
   */
Sends an open "App" event.
Sends an open "App" event when the "Songclip" content is first used in the user's session.
It is usually related to a button that enables the songclip content to be surfaced in the current user's session.




Sends an open " App " event . Sends an open " App " event when the " Songclip " content is first used in the user ' s session . It is usually related to a button that enables the songclip content to be surfaced in the current user ' s session .
async postAppOpen(params = {}) {
    const headers = this.getHeaders()
    const { context = {} } = params || {}
    const auxContext = this.populateContext(context || {})
    delete auxContext.sessionId
    try {
      const response = await axios({
        url: `${SNGCLP_API_URL}/events/open`,
        method: 'post',
        headers,
        data: { context: auxContext },
        timeout: this.config.timeout || 0,
        responseType: 'json',
        responseEncoding: 'utf8',
        maxRedirects: 5,
        proxy: this.config.proxy || null,
      })
      const { data = {}, status } = response && response.data ? response.data : {}
      if (data.context) {
        this.sessionId = data.context.sessionId
      }
      if (status !== 'success') {
        throw new Error(`[Songclip][postAppOpen] ${JSON.stringify(data || {} )}`)
      }
      return response.data || false
    } catch (error) {
      throw new Error(`[Songclip][postAppOpen] ${error}`)
    }
  }
async postAppOpen ( params = { } ) { const headers = this . getHeaders ( ) const { context = { } } = params || { } const auxContext = this . populateContext ( context || { } ) delete auxContext . sessionId try { const response = await axios ( { url : ` ${ SNGCLP_API_URL } ` , method : 'post' , headers , data : { context : auxContext } , timeout : this . config . timeout || 0 , responseType : 'json' , responseEncoding : 'utf8' , maxRedirects : 5 , proxy : this . config . proxy || null , } ) const { data = { } , status } = response && response . data ? response . data : { } if ( data . context ) { this . sessionId = data . context . sessionId } if ( status !== 'success' ) { throw new Error ( ` ${ JSON . stringify ( data || { } ) } ` ) } return response . data || false } catch ( error ) { throw new Error ( ` ${ error } ` ) } }
Sends an open "App" event.
Sends an open " App " event .