help_spot 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/TODO CHANGED
@@ -8,7 +8,6 @@ private.request.getTimeEvents
8
8
  private.request.getMailboxes
9
9
  private.request.merge
10
10
  private.filter.getColumnNames
11
- private.timetracker.search
12
11
  private.user.getFilters
13
12
  private.user.preferences
14
13
  private.util.getActiveStaff
@@ -1,3 +1,3 @@
1
1
  class HelpSpot
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
data/lib/help_spot.rb CHANGED
@@ -58,6 +58,10 @@ class HelpSpot
58
58
  api_request(:get, 'private.filter.get', options.merge(:xFilter => id), {:collection => 'filter', :item => 'request'})
59
59
  end
60
60
 
61
+ def search_time_events(options = {})
62
+ api_request(:get, 'private.timetracker.search', options, {:collection => 'time_events', :item => 'event'})
63
+ end
64
+
61
65
  private
62
66
 
63
67
  def api_request(http_method, method, options = {}, munge_options = {})
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <time_events>
3
+ <event>
4
+ <xTimeId>4502</xTimeId>
5
+ <xRequest>12481</xRequest>
6
+ <xPerson>Ian Landsman</xPerson>
7
+ <iSeconds>5400</iSeconds>
8
+ <dtGMTDate>June 9, 2008</dtGMTDate>
9
+ <dtGMTDateAdded>June 9 2008, 11:48 AM</dtGMTDateAdded>
10
+ <tDescription>Fixed 3rd floor network printer</tDescription>
11
+ <sUserId>76548</sUserId>
12
+ <sFirstName>Ian</sFirstName>
13
+ <sLastName>Landsman</sLastName>
14
+ <sEmail>ian@userscape.com</sEmail>
15
+ </event>
16
+ <event>
17
+ <xTimeId>4503</xTimeId>
18
+ <xRequest>12481</xRequest>
19
+ <xPerson>Ian Landsman</xPerson>
20
+ <iSeconds>5400</iSeconds>
21
+ <dtGMTDate>June 9, 2008</dtGMTDate>
22
+ <dtGMTDateAdded>June 9 2008, 11:49 AM</dtGMTDateAdded>
23
+ <tDescription>Fixed 4th floor network printer</tDescription>
24
+ <sUserId>76548</sUserId>
25
+ <sFirstName>Ian</sFirstName>
26
+ <sLastName>Landsman</sLastName>
27
+ <sEmail>ian@userscape.com</sEmail>
28
+ </event>
29
+ </time_events>
@@ -84,4 +84,12 @@ describe "HelpSpot" do
84
84
  requests.first.tNote.should == 'I would like to be able to upload documents over 1 gigabyte.'
85
85
  end
86
86
  end
87
+ describe 'time tracking events' do
88
+ it "can be searched" do
89
+ @help_spot.stub_get('/api/index.php?method=private.timetracker.search&start_time=1', 'private.timetracker.search.xml')
90
+ time_events = @help_spot.search_time_events(:start_time => 1)
91
+ time_events.size.should == 2
92
+ time_events.first.iSeconds.should == "5400"
93
+ end
94
+ end
87
95
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: help_spot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 4
9
+ version: 0.0.4
5
10
  platform: ruby
6
11
  authors:
7
12
  - Jesse Newland
@@ -9,49 +14,63 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-24 00:00:00 -05:00
17
+ date: 2010-05-24 00:00:00 -04:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rspec
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - "="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 1
29
+ - 3
30
+ - 0
23
31
  version: 1.3.0
24
- version:
32
+ type: :development
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: fakeweb
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
33
43
  version: "0"
34
- version:
44
+ type: :development
45
+ version_requirements: *id002
35
46
  - !ruby/object:Gem::Dependency
36
47
  name: hashie
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
40
50
  requirements:
41
51
  - - ~>
42
52
  - !ruby/object:Gem::Version
53
+ segments:
54
+ - 0
55
+ - 1
56
+ - 8
43
57
  version: 0.1.8
44
- version:
58
+ type: :runtime
59
+ version_requirements: *id003
45
60
  - !ruby/object:Gem::Dependency
46
61
  name: httparty
47
- type: :runtime
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
62
+ prerelease: false
63
+ requirement: &id004 !ruby/object:Gem::Requirement
50
64
  requirements:
51
65
  - - ~>
52
66
  - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
69
+ - 5
70
+ - 0
53
71
  version: 0.5.0
54
- version:
72
+ type: :runtime
73
+ version_requirements: *id004
55
74
  description: API wrapper for HelpSpot
56
75
  email: jnewland@gmail.com
57
76
  executables: []
@@ -72,6 +91,7 @@ files:
72
91
  - lib/help_spot/version.rb
73
92
  - spec/fixtures/error.xml
74
93
  - spec/fixtures/filter.get.xml
94
+ - spec/fixtures/private.timetracker.search.xml
75
95
  - spec/fixtures/request.get.xml
76
96
  - spec/fixtures/request.getCategories.xml
77
97
  - spec/fixtures/request.getCustomFields.xml
@@ -95,18 +115,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
115
  requirements:
96
116
  - - ">="
97
117
  - !ruby/object:Gem::Version
118
+ segments:
119
+ - 0
98
120
  version: "0"
99
- version:
100
121
  required_rubygems_version: !ruby/object:Gem::Requirement
101
122
  requirements:
102
123
  - - ">="
103
124
  - !ruby/object:Gem::Version
125
+ segments:
126
+ - 0
104
127
  version: "0"
105
- version:
106
128
  requirements: []
107
129
 
108
130
  rubyforge_project:
109
- rubygems_version: 1.3.5
131
+ rubygems_version: 1.3.6
110
132
  signing_key:
111
133
  specification_version: 3
112
134
  summary: API wrapper for HelpSpot