async postAddEvent({ id, context = {}, assetType = 'songclip' }) {
    const headers = this.getHeaders()
    const auxContext = this.populateContext(context)
    try {
      const response = await axios({
        url: assetType === 'songclip' ? `${SNGCLP_API_URL}/songclips/${id}/events/add` : `${SNGCLP_API_URL}/gifnotes/${id}/events/add`,
        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 (!this.sessionId && data.context ) {
        this.sessionId = data.context.sessionId
      }
      if (status !== 'success') {
        throw new Error(`[Songclip][postAddEvent] ${JSON.stringify(data || {} )}`)
      }
      return response.data || false
    } catch (error) {
      throw new Error(`[Songclip][postAddEvent] ${error}`)
    }
  }
/**
   * Sends an Add clip (identified by ID) event.
   *
   * POSTs an add event for given clip (identified by ID). It is used to notify that the user is actually merging the content into 
   * some other type of asset. It is used for music reporting services to Labels/Publishers/PRO.
   *
   * @link https://songclip.docs.apiary.io/#reference/0/songclip-audio-files/send-a-songclip-audio-file-add-event
   *
   * @param {Object} params                 Parameters for call
   * @param {Number} params.id              Clip identifier
   * @param {string} params.assetType       Type of asset ('songclip' or 'gifnote'). Default is 'songclip' (not implemented for 'gifnote' in Songclip API v2.4.4)
   * @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 Add clip (identified by ID) event.
POSTs an add event for given clip (identified by ID). It is used to notify that the user is actually merging the content into
some other type of asset. It is used for music reporting services to Labels/Publishers/PRO.



@param {Object} params                 Parameters for call
@param {Number} params.id              Clip identifier
@param {string} params.assetType       Type of asset ('songclip' or 'gifnote').
Sends an Add clip ( identified by ID ) event . POSTs an add event for given clip ( identified by ID ) . It is used to notify that the user is actually merging the content into some other type of asset . It is used for music reporting services to Labels / Publishers / PRO . @param { Object } params Parameters for call @param { Number } params . id Clip identifier @param { string } params . assetType Type of asset ( ' songclip ' or ' gifnote ' ) .
async postAddEvent({ id, context = {}, assetType = 'songclip' }) {
    const headers = this.getHeaders()
    const auxContext = this.populateContext(context)
    try {
      const response = await axios({
        url: assetType === 'songclip' ? `${SNGCLP_API_URL}/songclips/${id}/events/add` : `${SNGCLP_API_URL}/gifnotes/${id}/events/add`,
        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 (!this.sessionId && data.context ) {
        this.sessionId = data.context.sessionId
      }
      if (status !== 'success') {
        throw new Error(`[Songclip][postAddEvent] ${JSON.stringify(data || {} )}`)
      }
      return response.data || false
    } catch (error) {
      throw new Error(`[Songclip][postAddEvent] ${error}`)
    }
  }
async postAddEvent ( { id , context = { } , assetType = 'songclip' } ) { const headers = this . getHeaders ( ) const auxContext = this . populateContext ( context ) try { const response = await axios ( { url : assetType === 'songclip' ? ` ${ SNGCLP_API_URL } ${ id } ` : ` ${ SNGCLP_API_URL } ${ id } ` , 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 ( ! this . sessionId && 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 Add clip (identified by ID) event.
Sends an Add clip ( identified by ID ) event .