Module: SBA::Client::Sites

Includes:
Connection
Included in:
SBA::Client
Defined in:
lib/sba/client/sites.rb

Instance Method Summary collapse

Instance Method Details

#all_sites(options = {}) ⇒ Hash

Returns all recommended sites for all keywords and phrases.

Examples:

Returns recommended sites for keywords and phrases

SBA.all_sites

Returns:

  • (Hash)

See Also:



16
17
18
19
# File 'lib/sba/client/sites.rb', line 16

def all_sites(options={})
  response = get("rec_sites/all_sites/keywords.json", options)
  #simplify_response(response)
end

#sites_by_category(category, options = {}) ⇒ Hash

Returns all recommended sites for a specific category.

Examples:

SBA.sites_by_category("managing a business")    

Parameters:

  • category (String)

    Name of standard category.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



41
42
43
# File 'lib/sba/client/sites.rb', line 41

def sites_by_category(category, options={})
  response = get("rec_sites/category/#{category}.json", options)
end

#sites_by_domain(domain, options = {}) ⇒ Hash

Returns all recommended sites belonging to a specific domain

Examples:

SBA.sites_by_domain("irs")    

Parameters:

  • domain (String)

    Domain name without the www or .com, .gov, .net

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



65
66
67
# File 'lib/sba/client/sites.rb', line 65

def sites_by_domain(domain, options={})
  response = get("rec_sites/keywords/domain/#{domain}.json", options)
end

#sites_by_keyword(keyword, options = {}) ⇒ Hash

Returns all recommended sites for a specific keyword.

Examples:

SBA.sites_by_keyword("contracting")     

Parameters:

  • keyword (String)

    A search word or phrase.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



29
30
31
# File 'lib/sba/client/sites.rb', line 29

def sites_by_keyword(keyword, options={})
  response = get("rec_sites/keywords/#{keyword}.json", options)
end

#sites_by_master_term(term, options = {}) ⇒ Hash

Returns all recommended sites assigned a specific master term.

Examples:

SBA.sites_by_master_term("export")

Parameters:

  • term (String)

    A standard search word or phrase assigned to group of synonyms

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



53
54
55
# File 'lib/sba/client/sites.rb', line 53

def sites_by_master_term(term, options={})
  response = get("rec_sites/keywords/master_term/#{term}.json", options)
end