2017 © Pedro Peláez
 

library mongologue

A Light Weight Micro Blogger using MongoDB

image

mongologue/mongologue

A Light Weight Micro Blogger using MongoDB

  • Thursday, September 1, 2016
  • by biswojit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

Mongologue

A PHP Library to help build Microblogging Servers using Mongo DB, (*2)

Supports: * Multi Media Posts * Groups * Follow, Unfollow and Block Actions for Users and Groups * Commenting on Posts * Liking Posts, (*3)

Installation

Mongologue is available as a Composer Package., (*4)

Just add the following to your composer.json file:, (*5)

require : {"suyati/mongologue": "dev-develop"}

Using Mongologue

Initialize

$factory = new \Mongologue\Factory();
$mongologue = $factory->createMongologue(new \MongoClient("mongodb://127.0.0.1"), "MyTestDB");

Add Users

$user = array(
  "id"=>"1238899884791",
  "handle"=>"jdoe_1",
  "email"=>"jdoe1@x.com",
  "firstName"=>"John_1",
  "lastName"=>"Doe"
);

$mongologue->user('register', new \Mongologue\Models\User($user));

Create Posts

$post = array(
  "userId"=>$userId,
  "datetime"=>time(),
  "content"=>"user one",
  "category" => 1,
  "filesToBeAdded" => array(
      __DIR__."/../resources/sherlock.jpg"=>array(
          "type"=>"jpeg",
          "size"=>"100"
      )
  )
);

$mongologue->post('create', new \Mongologue\Models\Post($post));

Groups

$group1 = array(
  "name" => "Cool Group 1"
);
$groupId = $mongologue->group('register', new \Mongologue\Models\Group($group1));
$mongologue->group('join', $groupId, $userId);

The Versions

01/09 2016

dev-master

9999999-dev

A Light Weight Micro Blogger using MongoDB

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Avatar biswojit