Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

implement API for getting and changing tips #208

Closed
chadwhitacre opened this issue Jul 29, 2012 · 14 comments
Closed

implement API for getting and changing tips #208

chadwhitacre opened this issue Jul 29, 2012 · 14 comments

Comments

@chadwhitacre
Copy link
Contributor

@bradmontgomery wants an API so he can make make matching gifts. He needs to find out how much people are tipped and then to be able to change his tip to them.

@bradmontgomery
Copy link

Here's a couple of ideas for how we might do this over the api:

  • Let me send a GET request to get some info about how much is pledged (or has been pledged) for a given user
  • Let me send a PUT/POST request to a similar url in order to create/update a tip

@bradmontgomery
Copy link

I'm not sure what would be the best way to do this. Do we keep checking each user during the week, then update the match accordingly?

Or do we do this retroactively? We could check every Friday/Saturday and then match based on what was given the previous week?

I'm open to any other ideas!

@chadwhitacre
Copy link
Contributor Author

You can already get your current tip to people by hitting https://www.gittip.com/{username}/tip.json while you're authenticated. Should be able to do that with requests? If you come up with a recipe let's put it in an API docs section under /about/.

Need to add API key for POST to create/change.

@bradmontgomery
Copy link

That's my tip to other people, right? What about the amount of tips going to some arbitrary user? I don't care who's tipping, but say I want to match tips to "John Doe". Can I see that X number of people are going to tip $Y to "John Doe" this week?

Then can I send a POST request to tip an additional $Z to "John Doe"?

@chadwhitacre
Copy link
Contributor Author

@bradmontgomery I changed this ticket to be about providing the API needed to support you in this.

Are you willing to work with the existing tip structure (1, 3, 6, 12, 24) or were you hoping to tip in other amounts?

@bradmontgomery
Copy link

I think the existing tip structure would work.

One thing that's not clear to me yet, is "from whom does the tip come?" Right now gittip supports individuals tipping each other, but the original idea here was to let an organization (not necessarily a github organization) tip individuals. Maybe that's another Issue altogether (maybe related to #106).

I'm catching up a couple of other things, but would like to revisit this in a couple of days. I'd be more than willing to help add this, but if you're ready to implement now, don't let me hold you back :)

@chadwhitacre
Copy link
Contributor Author

#106 is kind of related but a somewhat drastic change. I've ticketed explicitly dealing companies into the existing giving structure as #221.

This is a priority for me since it's essentially money on the table. I'm reluctant to make major changes near payday, and I'm on vacation next week, so unfortunately I'm not sure I'll get to this before mid-August. :-/

@chadwhitacre
Copy link
Contributor Author

@bradmontgomery If you get to this before I do, I would expect this to manifest as two JSON simplates inside of www/%participant_id. We would need an API key communicated via www/%participant_id/index.html.

@chadwhitacre
Copy link
Contributor Author

Reminder that I'm on vacation this week. I'll be back on Friday, August 10 to run Gittip #10, and will pick up with development the week following. In an emergency please call my cell, +1-412-925-4220. Thanks!

@chadwhitacre
Copy link
Contributor Author

@bradmontgomery Do you need #221 resolved before this can work?

@bradmontgomery
Copy link

I don't think so, but I think we'd end up with a cleaner solution if it was resolved;

We'd probably just do what's described there: tip people with an existing user, but register a company credit card.

@chadwhitacre
Copy link
Contributor Author

@bradmontgomery @cliftonmckinney On #239 you mentioned budgeting $100 per month to start. That breaks down roughly to:

  • 25 people at $1 / week each
  • 8 people at $3 / week each
  • 4 people at $6 / week each
  • 2 people at $12 / week each
  • 1 person at $24 / week

Have you considered (or maybe you already are) just using a company card with a personal GitHub/Gittip account to set up gift tips to people whose software you use the most? That seems like a good next step rather than trying to over-automate the process at this point, maybe?

@bradmontgomery
Copy link

We talked about it this week, and this is what we're going to do for now; We're trying to push out some new stuff on other projects, and it's taking longer than I expected (doesn't it always!). Once I clear some of that off my plate, I want to come back to this.

chadwhitacre added a commit that referenced this issue Aug 20, 2012
We don't have cards migrated from Stripe to Balanced and we need to run
payday. Here's code to use stripe_customer_id and charge the user via
Stripe if they don't have a balanced_account_uri.
@chadwhitacre
Copy link
Contributor Author

Pretty sure we've implemented this now:

https://github.com/gittip/www.gittip.com#api

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