Module: RSimpy

Defined in:
lib/user.rb,
lib/links.rb,
lib/client.rb,
lib/rsimpy.rb,
lib/parameters.rb,
lib/base_service.rb,
lib/configuration.rb,
lib/posting_service.rb,
lib/querying_service.rb,
lib/errors/connection_error.rb,
lib/profile_storage_service.rb,
lib/errors/user_not_provided_error.rb,
lib/errors/required_field_missing_error.rb

Overview

user.rb : Encapsulates Simpy user account information

Copyright April 2009, Jamal Hansen. All Rights Reserved.

This is free software. Please see the LICENSE files for details.

Defined Under Namespace

Classes: BaseService, Client, Configuration, ConnectionError, Links, Parameters, PostingService, ProfileStorageService, QueryingService, RequiredFieldMissingError, User, UserNotProvidedError

Constant Summary collapse

MERGE_TAGS =
'MergeTags'
SPLIT_TAG =
'SplitTag'
RENAME_TAG =
"RenameTag"
REMOVE_TAG =
'RemoveTag'
'DeleteLink'
'SaveLink'
DELETE_NOTE =
'DeleteNote'
SAVE_NOTE =
'SaveNote'
GET_TAGS =
"GetTags"
"GetLinks"
GET_NOTES =
"GetNotes"

Instance Method Summary collapse

Instance Method Details



25
26
27
28
29
30
31
32
# File 'lib/rsimpy.rb', line 25

def delete_link param_hash={}
  user = build_user param_hash

  client = RSimpy::Client.new(user)
  service = RSimpy::PostingService.new RSimpy::DELETE_LINK, client

  service.execute param_hash[:params]
end


13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rsimpy.rb', line 13

def get_links param_hash={}
  user = build_user param_hash
  params = build_params param_hash

  client = RSimpy::Client.new(user)
  service = RSimpy::QueryingService.new RSimpy::GET_LINKS, client

  result = service.execute params
  result[:success] = service.success
  result
end