awesomemotive / edd-ios

iOS App for Easy Digital Downloads
0 stars 2 forks source link

Add Today stats to home page #30

Closed pippinsplugins closed 9 years ago

pippinsplugins commented 10 years ago

For myself and many others, the earnings for the current day is one of the most important stats. It makes sense that it be displayed on the home page.

pippinsplugins commented 10 years ago

@mps We have a user that wants to sponsor the development of this (I'll cover whatever his sponsorship doesn't). Could we schedule this out for sometime in the coming weeks?

mps commented 10 years ago

Right now we show current monthly earnings and all time earnings. This would be a 3rd item added or replacing one of those?

pippinsplugins commented 10 years ago

A third one.

On Sat, Aug 16, 2014 at 11:37 AM, Matthew Strickland < notifications@github.com> wrote:

Right now we show current monthly earnings and all time earnings. This would be a 3rd item added or replacing one of those?

— Reply to this email directly or view it on GitHub https://github.com/pippinsplugins/EDD-iOS-App/issues/30#issuecomment-52398002 .

mps commented 10 years ago

what does the JSON look like for this item?

pippinsplugins commented 10 years ago

Query: http://yoursite.com/edd-api/stats/?key=<key>&token=<token>&type=<QUERY TYPE>&date=today

Response:

{
    "earnings": {
        "today": "25.2"
    }
}
mps commented 9 years ago

@pippinsplugins I do not see this response using #34 credentials.

pippinsplugins commented 9 years ago

This works for me: https://pippinsplugins.com/edd-api/stats/?key=722f2700b691875e67417394adec72e0&token=e8311390e4b6c2ba12c77cc273298555&date=today&type=earnings

mps commented 9 years ago

ah I figured this would be returned from the earnings calls. Seems like I need to make two calls to get current month, alltime and today?

Just curious why today was not appended to the previous call that returns those other items?

pippinsplugins commented 9 years ago

Right, it's two calls.

We might combine them later (not really sure why we don't). I'll put it on our todo list.

mps commented 9 years ago

Sounds good.

pippinsplugins commented 9 years ago

@mps We have added Today to the default view for EDD v2.1.6.

mps commented 9 years ago

@pippinsplugins ok, so safe to remove two calls in favor of the one?

pippinsplugins commented 9 years ago

Yeah let's do that. Could you do a simple check? If the today stat is present in the API response, show it, otherwise don't? That way it will just start working as people update to EDD v2.1.6

mps commented 9 years ago

Sounds doable