Bruce Marriner
cadf36c775
Bump to v0.11.0
2016-02-20 20:53:56 -06:00
Chris Rhodes
457b03f66e
Fix deadlock because I'm dumb.
2016-02-19 23:00:41 -08:00
Chris Rhodes
c291988335
Bring back the Lock as it's technically correct.
2016-02-19 22:32:15 -08:00
Chris Rhodes
79247272ff
Handler updates, no backwards incompatible API changes.
...
AddHandler now returns a func that can remove the handler.
The handlers map is now guarded by its own mutex.
Moved eventMap to events.go for readability.
Improved documentation.
2016-02-19 22:28:21 -08:00
Chris Rhodes
32f8c03270
Fix a Lock instead of RLock in initialize.
2016-02-19 11:25:46 -08:00
Chris Rhodes
d22b7ffc90
Clean up mutexes around s.handlers so they exist only in discord.go
2016-02-17 23:17:31 -08:00
Bruce Marriner
aebfb09719
Baby Linting.
2016-02-15 21:50:41 -06:00
Chris Rhodes
b083ce00c7
Un-expose handlers. Clean up Session struct.
2016-02-14 21:58:29 -08:00
Chris Rhodes
88335b6f54
Small performance improvement. Added tests.
2016-02-14 19:01:45 -08:00
Chris Rhodes
6fa99712ef
Finish converting large switch statement into a map of functions.
2016-02-14 18:48:37 -08:00
Chris Rhodes
8ffaa85b0b
Thread safety and more events.
2016-02-14 13:41:56 -08:00
Chris Rhodes
fb6ae92555
Add basic support for mapped event handlers.
2016-02-14 13:17:20 -08:00
Bruce Marriner
f917d83f6e
Linting.
2016-01-27 23:39:56 -06:00
Bruce Marriner
9a63e50e22
Bump dev to v0.11.0-alpha
2016-01-27 13:31:14 -06:00
Bruce Marriner
fd42d568ec
Bump version to v0.10.0
2016-01-27 13:27:21 -06:00
Bruce Marriner
94b6199051
ShouldReconnectOnError and Compress are defaulted to true with New()
2016-01-24 13:21:32 -06:00
Chris Rhodes
bf5ca4d690
Fix comment.
2016-01-21 10:59:30 -08:00
Chris Rhodes
8b39278c3e
Get rid of Listen.
2016-01-21 10:58:13 -08:00
Chris Rhodes
c4869d7a43
Remove handshake.
2016-01-21 09:19:20 -08:00
Chris Rhodes
cd55a59ff9
Refactor open/close logic. Support OnConnect and OnDisconnect.
2016-01-20 22:47:34 -08:00
Chris Rhodes
1d9f97e283
Update New to allow an auth token to be specified.
2016-01-17 14:17:51 -08:00
Bruce Marriner
daa230a3c1
Bump dev version to 0.10.0-alpha
2016-01-12 08:31:00 -06:00
Bruce Marriner
e1bfc285a0
Bump version to 0.9.0
2016-01-12 08:29:44 -06:00
Bruce Marriner
2469147d8a
Even better checking that we don't close nil/closed chans.
2016-01-11 14:33:01 -06:00
Bruce Marriner
61b3b8122c
Only close chans if they are open, closes #80
2016-01-11 13:23:11 -06:00
Bruce Marriner
b5e45827fd
Better error checking for New() and Gateway() funcs, closes #75
2016-01-10 19:01:34 -06:00
Bruce Marriner
301fb980d3
Updated copyright year, cleaned up some comments.
2016-01-07 13:50:44 -06:00
Bruce Marriner
d737b91b77
Bump version to v0.9.0-alpha
2016-01-06 16:43:06 -06:00
Bruce Marriner
ad7b7603c6
Bump version for v0.8.0
2016-01-06 16:36:34 -06:00
Bruce Marriner
1ae278b8c0
Modify session close function to do a better job
2016-01-04 13:13:10 -06:00
Chris Rhodes
9ba6d5b7c1
Make state tracking optional.
2016-01-02 12:01:03 -08:00
Chris Rhodes
4e23e5fc35
Implement state tracking.
...
Currently maintains a list of Guilds (Members/Channels) and PrivateChannels.
2016-01-01 22:47:19 -08:00
Bruce Marriner
4e90b453b6
Bump develop branch to version 0.8.0-alpha
2015-12-29 13:48:18 -06:00
Bruce Marriner
31e27aaffb
Bump version to 0.7.0
2015-12-29 13:45:28 -06:00
Bruce Marriner
ff03e10888
Bump version for 0.7.0-alpha for development
2015-12-21 11:52:54 -06:00
Bruce Marriner
cc6280cee3
Bump version to 0.6.0
2015-12-21 11:48:11 -06:00
Bruce Marriner
0a5055904c
Up version to 0.6.0-alpha
2015-12-21 09:48:07 -06:00
Bruce Marriner
0fbfc66554
Comments, example posible future main data struct
2015-12-20 00:12:57 -06:00
Bruce Marriner
40a7e717f5
Added VERSION constant
2015-12-17 08:23:48 -06:00
Bruce Marriner
1d06c4a3b8
Added helper func New() which greatly simplifies creating a new Discord session.
2015-12-07 13:54:06 -06:00
Bruce Marriner
552abf8818
Reworded package comment
2015-11-23 10:17:10 -06:00
Bruce Marriner
35e3966b91
Reworded top comment
2015-11-23 10:16:23 -06:00
Bruce Marriner
10044d50e8
Initial add of discord.go to be used for higher level functions
2015-11-23 09:45:07 -06:00
Bruce Marriner
0a76b91f00
discord.go file has no purpose right now.
2015-11-22 14:37:50 -06:00
Bruce Marriner
f4445fb782
Commented out file, as it's not being used now.
2015-11-12 12:21:10 -06:00
Bruce Marriner
a5d3e9378e
Made session in Discord strut a pointer. Probably will change that again :)
2015-11-12 09:59:02 -06:00
Bruce Marriner
0840d1003d
Removed endpoint variables and moved to restapi.go
2015-11-09 15:09:56 -06:00
Bruce Marriner
2c3ca777f9
Clean up, notes
2015-11-09 14:22:36 -06:00
Bruce Marriner
fff4fa20e9
Clean up
2015-11-08 21:57:49 -06:00
Bruce Marriner
e6789fde74
Inital add of Websockets
2015-11-08 21:42:16 -06:00