This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
import yampy | |
import webbrowser | |
def get_input(prompt): | |
if sys.hexversion > 0x03000000: | |
return input(prompt) | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) Microsoft Corporation | |
# All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML Components | |
http://msdn.microsoft.com/en-us/library/ms532146.aspx | |
http://www.w3.org/TR/NOTE-HTMLComponents | |
Element behaviors | |
http://msdn.microsoft.com/en-us/library/ms531426(v=vs.85).aspx | |
Introduction to DHTML Behaviors | |
http://msdn.microsoft.com/en-us/library/ms531079(v=vs.85).aspx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PostFile | |
{ | |
public T Post<T>(string path, string text, List<Attachment> attachments) | |
{ | |
using (var restClient = new RestClient()) | |
using (var content = new MultipartFormDataContent()) | |
{ | |
// Message part | |
var messageContent = new StringContent(text); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" | |
data-app-id="SPECIFY APP CLIENT ID HERE" | |
src="https://assets.yammer.com/assets/platform_js_sdk.js"></script> | |
<script> | |
yam.getLoginStatus({ token: 'SPECIFY A TOKEN ASSOCIATED WITH APP CLIENT ID' }, | |
function (response) { | |
if (response.authResponse) { | |
alert("logged in"); | |
console.dir(response); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public T Post<T>(string path, IEnumerable<KeyValuePair<string, string>> parameters, FilePayload payload) | |
{ | |
using (var restClient = new RestClient()) | |
{ | |
using (var content = new MultipartFormDataContent()) | |
{ | |
content.Add(new FormUrlEncodedContent(parameters)); | |
var streamContent = new StreamContent(new MemoryStream(payload.ContentBytes)); | |
content.Add(streamContent, "attachment1", payload.FileName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
IF [%1]==[] ( | |
IF [%2]==[] ( | |
ECHO "Usage: export.cmd <OAuth Access Token> <Directory>" | |
EXIT /B | |
) | |
) | |
:: Your Yammer OAuth 2 Access Token. This must be a token for a verified admin account. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import csv | |
import argparse | |
import re | |
import nltk | |
from operator import itemgetter | |
from string import punctuation | |
def replace_topic(matched_topic): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://www.yammer.com/api/v1/activity.json HTTP/1.1 | |
Authorization: Bearer REMOVED | |
Content-Type: application/json; charset=utf-8 | |
Host: www.yammer.com | |
Content-Length: 392 | |
Expect: 100-continue | |
Connection: Keep-Alive | |
{"activity":{"actor":{"name":"Brian Lyttle","email":"[email protected]"},"action":"yammermvc:publish","object":{"url":"https://bing.com/?233334","description":"This is a cool image","video":{"width":1,"height":1},"type":"yammermvc:photo","title":"Cool image","image":"http://news.bbcimg.co.uk/media/images/68853000/jpg/_68853657_ac86edof.jpg"},"private":"false","message":"","users":null}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST https://www.yammer.com/api/v1/activity.json HTTP/1.1 | |
Authorization: Bearer REMOVED_TOKEN | |
Content-Type: application/json; charset=utf-8 | |
Host: www.yammer.com | |
Content-Length: 405 | |
Expect: 100-continue | |
{ | |
"activity": { | |
"actor": { |