Make API functions `public`.
This commit is contained in:
parent
7b864f1758
commit
732ac7774e
|
@ -24,7 +24,7 @@ public class Config {
|
|||
- realmURL: The URL of a Zulip realm.
|
||||
- Example: https://chat.zulip.org
|
||||
*/
|
||||
init(
|
||||
public init(
|
||||
emailAddress: String,
|
||||
apiKey: String,
|
||||
realmURL: String
|
||||
|
|
|
@ -25,7 +25,7 @@ public class Events {
|
|||
- Parameters:
|
||||
- config: The `Config` to use.
|
||||
*/
|
||||
init(config: Config) {
|
||||
public init(config: Config) {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public class Events {
|
|||
`last_event_id`, the initial event ID to receive an event with,
|
||||
or an error if there is one.
|
||||
*/
|
||||
func register(
|
||||
public func register(
|
||||
applyMarkdown: Bool = false,
|
||||
clientGravatar: Bool = false,
|
||||
eventTypes: [String] = [],
|
||||
|
@ -181,7 +181,7 @@ public class Events {
|
|||
- callback: A callback, which will be passed a list of events, or
|
||||
an error, if there is one.
|
||||
*/
|
||||
func get(
|
||||
public func get(
|
||||
queueID: String,
|
||||
lastEventID: Int,
|
||||
dontBlock: Bool = false,
|
||||
|
@ -225,7 +225,7 @@ public class Events {
|
|||
- callback: A callback, which will be passed an error if there is
|
||||
one.
|
||||
*/
|
||||
func deleteQueue(
|
||||
public func deleteQueue(
|
||||
queueID: String,
|
||||
callback: @escaping (Error?) -> Void
|
||||
) {
|
||||
|
|
|
@ -28,7 +28,7 @@ public class Messages {
|
|||
- Parameters:
|
||||
- config: The `Config` to use.
|
||||
*/
|
||||
init(config: Config) {
|
||||
public init(config: Config) {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class Messages {
|
|||
- callback: A callback, which will be passed the ID of the new
|
||||
message, or an error.
|
||||
*/
|
||||
func send(
|
||||
public func send(
|
||||
messageType: MessageType,
|
||||
to: String,
|
||||
subject: String?,
|
||||
|
@ -114,7 +114,7 @@ public class Messages {
|
|||
- callback: A callback, which will be passed the messages, or an
|
||||
error.
|
||||
*/
|
||||
func get(
|
||||
public func get(
|
||||
narrow: [Any],
|
||||
anchor: Int,
|
||||
amountBefore: Int,
|
||||
|
@ -177,7 +177,7 @@ public class Messages {
|
|||
- callback: A callback, which will be passed the rendered HTML
|
||||
string, or an `Error`.
|
||||
*/
|
||||
func render(
|
||||
public func render(
|
||||
content: String,
|
||||
callback: @escaping (String?, Error?) -> Void
|
||||
) {
|
||||
|
@ -218,7 +218,7 @@ public class Messages {
|
|||
- callback: A callback, which will be passed an Error if
|
||||
there is one.
|
||||
*/
|
||||
func update(
|
||||
public func update(
|
||||
messageID: Int,
|
||||
content: String,
|
||||
callback: @escaping (Error?) -> Void
|
||||
|
|
|
@ -26,7 +26,7 @@ public class Streams {
|
|||
- Parameters:
|
||||
- config: The `Config` to use.
|
||||
*/
|
||||
init(config: Config) {
|
||||
public init(config: Config) {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class Streams {
|
|||
- callback: A callback, which will be passed the streams, or an
|
||||
error.
|
||||
*/
|
||||
func getAll(
|
||||
public func getAll(
|
||||
includePublic: Bool = true,
|
||||
includeSubscribed: Bool = true,
|
||||
includeDefault: Bool = false,
|
||||
|
@ -91,7 +91,7 @@ public class Streams {
|
|||
- name: The name of the stream.
|
||||
- callback: A callback, which will be passed the ID, or an error.
|
||||
*/
|
||||
func getID(
|
||||
public func getID(
|
||||
name: String,
|
||||
callback: @escaping (Int?, Error?) -> Void
|
||||
) {
|
||||
|
@ -130,7 +130,7 @@ public class Streams {
|
|||
- callback: A callback, which will be passed the streams, or an
|
||||
error.
|
||||
*/
|
||||
func getSubscribed(
|
||||
public func getSubscribed(
|
||||
callback: @escaping (
|
||||
[[String: Any]]?,
|
||||
Error?
|
||||
|
@ -181,7 +181,7 @@ public class Streams {
|
|||
and a list of names of streams that could not be subscribed to
|
||||
because the user was unauthorized; or an error if there is one.
|
||||
*/
|
||||
func subscribe(
|
||||
public func subscribe(
|
||||
streams: [[String: Any]],
|
||||
inviteOnly: Bool = false,
|
||||
announce: Bool = false,
|
||||
|
@ -282,7 +282,7 @@ public class Streams {
|
|||
the streams that could not be unsubscrived from because the user
|
||||
was already subscribed, or an error if there is one.
|
||||
*/
|
||||
func unsubscribe(
|
||||
public func unsubscribe(
|
||||
streamNames: [String],
|
||||
principals: [String] = [],
|
||||
callback: @escaping (
|
||||
|
|
|
@ -13,7 +13,7 @@ public class Users {
|
|||
- Parameters:
|
||||
- config: The `Config` to use.
|
||||
*/
|
||||
init(config: Config) {
|
||||
public init(config: Config) {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class Users {
|
|||
- callback: A callback, which will be passed a list of users, or an
|
||||
error if there is one.
|
||||
*/
|
||||
func getAll(
|
||||
public func getAll(
|
||||
clientGravatar: Bool = false,
|
||||
callback: @escaping ([[String: Any]]?, Error?) -> Void
|
||||
) {
|
||||
|
@ -67,7 +67,7 @@ public class Users {
|
|||
- callback: A callback, which will be passed the profile, or an
|
||||
error if there is one.
|
||||
*/
|
||||
func getCurrent(
|
||||
public func getCurrent(
|
||||
clientGravatar: Bool = false,
|
||||
callback: @escaping ([String: Any]?, Error?) -> Void
|
||||
) {
|
||||
|
@ -121,7 +121,7 @@ public class Users {
|
|||
- callback: A callback, which will be passed an error if there is
|
||||
one.
|
||||
*/
|
||||
func create(
|
||||
public func create(
|
||||
email: String,
|
||||
password: String,
|
||||
fullName: String,
|
||||
|
|
|
@ -12,7 +12,7 @@ public class Zulip {
|
|||
- Parameters:
|
||||
- config: The `Config` to use.
|
||||
*/
|
||||
init(config: Config) {
|
||||
public init(config: Config) {
|
||||
self.config = config
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ public class Zulip {
|
|||
|
||||
- Returns: The `Messages` client.
|
||||
*/
|
||||
func messages() -> Messages {
|
||||
public func messages() -> Messages {
|
||||
return Messages(config: self.config)
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class Zulip {
|
|||
|
||||
- Returns: The `Streams` client.
|
||||
*/
|
||||
func streams() -> Streams {
|
||||
public func streams() -> Streams {
|
||||
return Streams(config: self.config)
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class Zulip {
|
|||
|
||||
- Returns: The `Users` client.
|
||||
*/
|
||||
func users() -> Users {
|
||||
public func users() -> Users {
|
||||
return Users(config: self.config)
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class Zulip {
|
|||
|
||||
- Returns: The `Events` client.
|
||||
*/
|
||||
func events() -> Events {
|
||||
public func events() -> Events {
|
||||
return Events(config: self.config)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue