Allow content to be pulled from a filePath, also cache the calls. #4

Merged
merged 5 commits into from Oct 30, 2012

2 participants

@brntbeer
  1. Added searching by a filePath.
    • Allows more automation around getting code-contents
    • Jekyll files could even use this to more easily embed content on a post.
  2. Because of additional method, caching is more important.
    • Two method calls mean getting rate-limited twice as fast
    • If we don't always cache, we would probably need an additional method parameter. This would end up breaking existing method calls. 😦 👎
brntbeer added some commits Oct 30, 2012
@brntbeer brntbeer Updated script to also work if you only give a filepath in a repo 176eeee
@brntbeer brntbeer additional commenting on readme 2a4607a
@brntbeer brntbeer added caching.
In general getting content by filepath's was sending 2 requests,
which reaches the request-limit of 60 very fast. Even though the
limits are on an IP basis this caching scheme seems best.

I also realize that ajax calls have a `cache: true`. However, this
was not working for `$.getGithubFile` for some reason, and this
method works absolutely.
9ed5730
@brntbeer brntbeer removed optional caching. always cache 3c9752f
@brntbeer brntbeer Accidentally forgot to remove optional-cache call all the way 86bfcf1
@jamesward jamesward merged commit 621d025 into jamesward:master Oct 30, 2012
@jamesward
Owner

Awesome! Thank you!

@brntbeer

No problem! Such a fast merge! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment