Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

New Spice: Reddit user search spice #1505

Closed
wants to merge 5 commits into from

Conversation

samph
Copy link
Contributor

@samph samph commented Feb 8, 2015

Spice Pull Request Template

Using this template will help us better understand your Instant Answer and assist you when necessary. Simply copy and paste the markdown below into the description of your GitHub pull request and complete as appropriate.

What does your Instant Answer do?
Returns account information about reddit user accounts

What problem does your Instant Answer solve (Why is it better than organic links)?
Direct information about a reddit account, rather than having to click through to find it on reddit user page

What is the data source for your Instant Answer? (Provide a link if possible)
https://www.reddit.com/user/reddit/about.json

Why did you choose this data source?
Its the official reddit API endpoint

Are there any other alternative (better) data sources?
No

What are some example queries that trigger this Instant Answer?
reddit user alienth
reddit user krispykrackers

Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
Reddit users, those looking for reddit users

Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
No

Which existing Instant Answers will this one supersede/overlap with?
IAs exist for general reddit post search and subreddit search, but I believe there is little to no overlap.

Are you having any problems? Do you need our help with anything?
N/A

What are the terms of use for the API? Will DuckDuckGo need specific authorization (e.g. an API key)? Are there any costs associated with API usage?
I am not aware of specific issues, and usage/terms will be no different to existing reddit search and reddit subreddit search IAs. API keys and authorisations are not required and there are no associated costs.

Where did you hear about DuckDuckHack? (For first time contributors)
N/A (HackerNews)

What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
screen shot 2015-02-08 at 14 50 45

Checklist

Please place an 'X' where appropriate.

[X] Added metadata and attribution information
[X] Wrote test file and added to t/ directory
[X] Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)
[X] Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)
[X] Tested cross-browser compatibility

    Please let us know which browsers/devices you've tested on:
    - Windows 8
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 10

    - Windows 7
        [] Google Chrome
        [] Firefox
        [] Opera
        [] IE 8
        [] IE 9
        [] IE 10

    - Windows XP
        [] IE 7
        [] IE 8

    - Mac OSX
        [X] Google Chrome
        [X] Firefox
        [X] Opera
        [] Safari

    - iOS (iPhone)
        [X] Safari Mobile
        [] Google Chrome
        [] Opera

    - iOS (iPad)
        [] Safari Mobile
        [] Google Chrome
        [] Opera

    - Android
        [] Firefox
        [] Native Browser
        [] Google Chrome
        [] Opera

@samph
Copy link
Contributor Author

samph commented Feb 8, 2015

Addressed some potential code style issues in further commits. Should be all done now.

@samph samph closed this Feb 8, 2015
@samph samph reopened this Feb 8, 2015
@samph
Copy link
Contributor Author

samph commented Feb 8, 2015

Didn't appreciate that the 'close and comment' button would close the pull request and not the comment box

@moollaza
Copy link
Member

moollaza commented Feb 9, 2015

@samph thanks a lot for contributing, we really appreciate it! 😃

We'll be sure to review this shortly and give you some feedback.


Also, this is about our 3rd Reddit IA. I'm thinking we should start namespacing them under DDG::Spice::Reddit::. I think Reddit::Thread, Reddit::SubReddit and Reddit::User make sense.

Or we could just name them RedditThread, RedditUser, RedditSubReddit? I guess seeing similar files/things in an aptly named folder/directory just makes me happy :)

@MrChrisW @mintsoft @jagtalon any thoughts?

@mintsoft
Copy link
Collaborator

mintsoft commented Feb 9, 2015

I'm not especially fussed either way; however namespacing seems tidier

return time;
});

Spice.registerHelper("reddit_user_search_friendly_account_age", function(timestamp){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've now added support for moment.js. If you wrap the Spice.add() call in DDG.require('moment.js', function() { ... }); you'll be able to use moment() which should reduce this function considerable!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation for moment.js is over here http://momentjs.com/

@moollaza
Copy link
Member

moollaza commented Apr 9, 2015

Ping! @samph are you still interested in finishing this up? We'd love to see it go live!

@samph
Copy link
Contributor Author

samph commented Apr 9, 2015

Thanks for the reminder! Hopefully I'll submit an update taking all the comments into account over the weekend.

On 9 Apr 2015, at 18:03, Zaahir Moolla notifications@github.com wrote:

Ping! @samph are you still interested in finishing this up? We'd love to see it go live!


Reply to this email directly or view it on GitHub.

@jagtalon jagtalon self-assigned this Apr 10, 2015
@moollaza
Copy link
Member

@samph ping! Just checking in to see if you're still in interested in finishing this up? There's no rush, but we'd love to see it go live!

@moollaza
Copy link
Member

Closing for now, we can always re-open later if you'd like to finish this up!

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

Successfully merging this pull request may close these issues.

None yet

5 participants