Documentation ¶
Overview ¶
Package gomegle lets you interface with Omegle in Go
Index ¶
- type Event
- type LogEntry
- type Omegle
- func (o *Omegle) Disconnect() (err error)
- func (o *Omegle) Generate(identdigests string, logs []LogEntry) (url string, err error)
- func (o *Omegle) GetID() (err error)
- func (o *Omegle) GetStatus() (st Status, err error)
- func (o *Omegle) Recaptcha(challenge, response string) error
- func (o *Omegle) SendMessage(msg string) (err error)
- func (o *Omegle) ShowTyping() (err error)
- func (o *Omegle) StopLookingForCommonLikes() error
- func (o *Omegle) StopTyping() (err error)
- func (o *Omegle) UpdateEvents() (st []interface{}, msg [][]string, err error)
- type Status
- type Tp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event int
Event is a type used for storing the above event codes
const ( WAITING Event = iota // Waiting we get connected to a stranger/spyee or other session CONNECTED // We were connected to a session DISCONNECTED // We were disconnected from a session TYPING // Stranger is typing MESSAGE // Got a message from a stranger ERROR // Some kind of error occured STOPPEDTYPING // Stranger stopped typing IDENTDIGESTS // Identification of the session CONNECTIONDIED // The connection has died unfortunately due to some reason :( ANTINUDEBANNED // You were banned due to "bad behaviour" in the chat QUESTION // Question in a spyee/spyer session SPYTYPING // Spyee 1 or 2 is typing SPYSTOPPEDTYPING // Spyee 1 or 2 has stopped typing SPYDISCONNECTED // Spyee 1 or 2 has disconnected SPYMESSAGE // Spyee 1 or 2 has sent a message SERVERMESSAGE // Some kind of server message COUNT // Updated connection/online count COMMONLIKES // Shared topics between you and the stranger // If you get this you have to prove you're human by going to // google.com/recaptcha/api/image?c=[challenge] and sending the answer with // Recaptcha() RECAPTCHAREQUIRED RECAPTCHAREJECTED // Only in college mode, the stranger's college PARTNERCOLLEGE )
Types of events UpdateEvents() will return
type Omegle ¶
type Omegle struct { Lang string // Optional, two character language code Group string // Optional, "unmon" to join unmonitored chat Server string // Optional, can specify a certain server to use Question string // Optional, if not empty used as the question in "spyer" mode Cansavequestion bool // Optional, if question is not "" then permit omegle to save the question Wantsspy bool // Optional, if true then "spyee" mode is started Topics []string // Optional, if not empty will look only for people interested in these topics College string // Optional, if not empty must exactly match the college identifier as on omegle.com (such as "ktu.edu") CollegeAuth string // Optional, if not empty then used as identifier of your college. You need to get this from omegle.com AnyCollege bool // Optional, if in college mode then it will connect you to any college // contains filtered or unexported fields }
Omegle stores information about the connection to omegle.com
func (*Omegle) Disconnect ¶
Disconnect from the Omegle server
func (*Omegle) Generate ¶
Generate sends a request to generate a log file to omegle and returns the image link.
func (*Omegle) GetStatus ¶
GetStatus gets status of omegle via http://[server].omegle.com/status
func (*Omegle) Recaptcha ¶
Recaptcha sends back the response to given challenge to omegle Only to be used in case of recaptchaRequired or recaptchaRejected events
func (*Omegle) SendMessage ¶
SendMessage sends a message to the stranger
func (*Omegle) ShowTyping ¶
ShowTyping shows to the stranger that we are typing
func (*Omegle) StopLookingForCommonLikes ¶
StopLookingForCommonLikes stops looking for strangers only interested in specified topics
func (*Omegle) StopTyping ¶
StopTyping shows to the stranger that we stopped typing
func (*Omegle) UpdateEvents ¶
UpdateEvents visits the events page and gathers new events
type Status ¶
type Status struct { Count int // Connection count ForceUnmon bool // If true then your IP was banned Antinudeservers []string Antinudepercent float64 // If spyQueueTime is larger, there are more spies than spyees which the client // can use to suggest a mode SpyQueueTime float64 SpyeeQueueTime float64 Timestamp float64 Servers []string }
Status stores information about omegle status
type Tp ¶
type Tp int
Saves the following constants used in LogEntry
const ( DEF Tp = iota // smaller, bold font, gray (Arg1) Q // blue question box (Arg1) STR // large font, first item is red (Arg1) STR1 // as above (Arg1) STR2 // large font, first item is blue (Arg1) YOU // as above (Arg1) NORMAL // normal font, first item is bold (Arg1, Arg2) )
Available log entry types for Generate(). The parantheses next to the constants show which arguments are used, if any.