Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

dataTimeframe value & set_value function is deprecated #2

Open
ValAug opened this issue May 14, 2020 · 4 comments
Open

dataTimeframe value & set_value function is deprecated #2

ValAug opened this issue May 14, 2020 · 4 comments

Comments

@ValAug
Copy link

ValAug commented May 14, 2020

What value do you use for the timeframe=' + dataTimeframe + '?

Are you planning to update the set_value function as is deprecated and now you will have to use the at() method?

Thank you for sharing your work

@scottwestover
Copy link
Member

@ValAug

Thanks for letting me know about the set_value function being deprecated in pandas. I will create a separate ticket to get the code example updated, and will try to get to it when time allows.

For the timeframe value, this the amount of time you want to pull data for. This value is in minutes and the max value is 24 hours. How it works is, when you query the API, the API takes the current timestamp and calculates the start time of the query by taking the current timestamp and subtracting the timeframe value you provide.

You can read more on this here: https://developers.liveperson.com/operational-realtime-api-methods-engagement-activity.html

@scottwestover
Copy link
Member

@ValAug

Thanks again for letting me know about the set_value method. I have updated the example to use the at method. You can see the new changes here: https://github.com/LiveEngage-Examples/LiveEngage-Real-Time-Operational-API/tree/master/Python-rt-api-to_csv-pandas-Example

@ValAug
Copy link
Author

ValAug commented May 15, 2020 via email

@scottwestover
Copy link
Member

@ValAug

For the dataTimeframe, this needs to be the number of minutes that you would like to pull data for from the API. In the example, we set this value to 15, but it can be any number of minutes up to 1440.

For the other block of code, the myDate, myTimeFrame, and myTimeZone variables should be created and populated automatically for you here: https://github.com/LiveEngage-Examples/LiveEngage-Real-Time-Operational-API/blob/master/Python-rt-api-to_csv-pandas-Example/rt-api-to_csv-pandas.py#L66

For example, when I run the script, these are the values that are populated for me for those variables:

myDate: 2020-05-17
myTimeFrame : 19:13 - 19:28
myTimeZone : EDT

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants