This commit is contained in:
mgabdev
2020-05-02 02:25:55 -04:00
parent e9f01c0b16
commit 196a906cec
62 changed files with 866 additions and 509 deletions

View File

@@ -9,7 +9,7 @@ class Api::V1::GifsController < Api::BaseController
def categories
uri = URI('https://api.tenor.com/v1/categories')
theOptions = { :key => "QHFJ0C5EWGBH" }
theOptions = { :key => "TENOR_KEY" }
uri.query = URI.encode_www_form(theOptions)
res = Net::HTTP.get_response(uri)
@@ -19,7 +19,7 @@ class Api::V1::GifsController < Api::BaseController
def search
uri = URI('https://api.tenor.com/v1/search')
theOptions = {
:key => "QHFJ0C5EWGBH",
:key => "TENOR_KEY",
:media_filter => "minimal",
:limit => 30,
:q => params[:search],

View File

@@ -22,8 +22,10 @@ class Api::V1::StatusesController < Api::BaseController
render json: @status, serializer: REST::StatusSerializer
end
# direct descendants only
def comments
descendants_results = @status.descendants(CONTEXT_LIMIT, current_account)
descendants_results = @status.descendants(CONTEXT_LIMIT, current_account, nil, nil, 1)
puts "descendants_results: " + descendants_results.inspect
loaded_descendants = cache_collection(descendants_results, Status)
@context = Context.new(descendants: loaded_descendants)