8000 GitHub - sokkit-io/xiphias-model-common: This repository contains generated Go code for the Xiphias Model Common protocol buffers used by Kik Messenger.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This repository contains generated Go code for the Xiphias Model Common protocol buffers used by Kik Messenger.

Notifications You must be signed in to change notification settings

sokkit-io/xiphias-model-common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

xiphias-model-common

This repository contains generated Go code for the Xiphias Model Common protocol buffers used by Kik Messenger.

Installation

go get github.com/sokkit-io/xiphias-model-common@latest

Usage

You can use the generated code to marshal and unmarshal protocol buffer messages, typically from a Kik XMPP stanza.

For example:

package main

import (
	"encoding/base64"
	"github.com/golang/protobuf/proto"
	"github.com/sokkit-io/xiphias-model-common/generated/go"
	"strings"
)

func main() {
    // Let's say you've got a base64-encoded response from Kik that you want to decode. This happens to be a XiBareUserJid body.
    xiBareUserJidB64 := "Cgd0ZWRfdzZ3"
    
    // Remove trailing padding characters
    xiBareUserJidB64 = strings.TrimRight(xiBareUserJidB64, "=")
    
    // Decode the base64-encoded response
    xiBareUserJidBytes, _ := base64.RawURLEncoding.DecodeString(xiBareUserJidB64)
    
    // Prepare a XiBareUserJid struct to unmarshal the response into
    xiBareUserJid := &common.XiBareUserJid{}
    
    // Unmarshal the response into the XiBareUserJid struct
    _ = proto.Unmarshal(xiBareUserJidBytes, xiBareUserJid)
    
    // Print the JID
    println(xiBareUserJid.GetLocalPart())
}

Notes

Protocol buffer definitions were extracted from the Kik Messenger Android application version 15.51.1.28280 using pbtk.

Definitions will be updated as breaking changes are introduced.

Acknowledgements

About

This repository contains generated Go code for the Xiphias Model Common protocol buffers used by Kik Messenger.

Resources

Stars

Watchers

Forks

Packages

No packages published
0