Skip to content

Commit 8788410

Browse files
committed
[UPD] README and Podspec
1 parent 0f1c90e commit 8788410

File tree

3 files changed

+17
-72
lines changed

3 files changed

+17
-72
lines changed
1 Byte
Binary file not shown.

README.md

Lines changed: 16 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -111,83 +111,28 @@ public protocol HandlerRecastRequestProtocol : class
111111
Implement those metods in your ViewController.
112112

113113
```swift
114-
import RecastAI
115-
116114
/**
117-
Class ViewController Example of implementations for Text & Voice Requests
118-
*/
119-
class ViewController: UIViewController, HandlerRecastRequestProtocol
120-
{
121-
//Outlets
122-
@IBOutlet weak var requestTextField: UITextField!
123-
124-
//Vars
125-
var app : RecastAPI?
126-
var recording : Bool = true
127-
128-
override func viewDidLoad()
129-
{
130-
super.viewDidLoad()
131-
// Do any additional setup after loading the view, typically from a nib.
115+
Method called when the request was successful
132116
133-
//Initialise app with token & handlerRecastProtocol
134-
self.app = RecastAPI(token : "YOUR_APP_TOKEN", handlerRecastRequestProtocol: self)
135-
}
136-
137-
/**
138-
Method called when the request was successful
117+
- parameter response: the response returned from the Recast API
139118
140-
- parameter response: the response returned from the Recast API
141-
142-
- returns: void
143-
*/
144-
func recastRequestDone(response : Response)
145-
{
146-
print(response.source)
147-
}
148-
149-
/**
150-
Method called when the request failed
151-
152-
- parameter error: error returned from the Recast API
119+
- returns: void
120+
*/
121+
func recastRequestDone(response : Response)
122+
{
123+
print(response.source)
124+
}
153125

154-
- returns: void
155-
*/
156-
func recastRequestError(error : NSError)
157-
{
158-
print("Delegate Error : \(error)")
159-
}
126+
/**
127+
Method called when the request failed
160128
161-
/**
162-
Make text request to Recast.AI API
163-
*/
164-
@IBAction func makeRequest()
165-
{
166-
if (!(self.requestTextField.text?.isEmpty)!)
167-
{
168-
//Call makeRequest with string parameter to make a text request
169-
self.app?.makeRequest(self.requestTextField.text!)
170-
}
171-
}
129+
- parameter error: error returned from the Recast API
172130
173-
/**
174-
Make Voice request to Recast.AI API
175-
*/
176-
@IBAction func makeVoiceRequest()
177-
{
178-
if (self.recording)
179-
{
180-
self.recording = !self.recording
181-
//Call startVoiceRequest to start recording your voice
182-
self.app!.startVoiceRequest()
183-
}
184-
else
185-
{
186-
self.recording = !self.recording
187-
//Call stopVoiceRequest to stop recording your voice and launch the request to the Recast.AI API
188-
self.app!.stopVoiceRequest()
189-
}
190-
}
131+
- returns: void
132+
*/
133+
func recastRequestError(error : NSError)
134+
{
135+
print("Delegate Error : \(error)")
191136
}
192137
```
193138

RecastAI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = "RecastAI"
11-
s.version = "0.6.0"
11+
s.version = "1.0.0"
1212
s.summary = "Recast.AI Official iOS SDK in Swift"
1313

1414
# This description is used to generate tags and improve search results.

0 commit comments

Comments
 (0)