# gh-recent-activity

> Get user's github activity

Latest version **1.1.2** (published 2022-12-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install gh-recent-activity
pnpm add gh-recent-activity
yarn add gh-recent-activity
bun add gh-recent-activity
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2022-12-25 |
| First published | 2021-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Akul Srivastava |
| Maintainers | akulsr0 |
| Keywords | github, recent, activity, events |

## Links

- npm: https://www.npmjs.com/package/gh-recent-activity
- npm.io page: https://npm.io/package/gh-recent-activity

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.21.1

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 1.1.2 (latest) — 2022-12-25
- 1.1.1 — 2022-12-25
- 1.1.0 — 2022-12-25
- 1.0.3 — 2022-05-18
- 1.0.2 — 2021-07-23
- 1.0.1 — 2021-07-21
- 1.0.0 — 2021-07-18

## README

# Github Recent Activity

Get recent activity of a user on Github.

## Working Demo

Link: https://react-hkd9sw.stackblitz.io/

![demo](https://user-images.githubusercontent.com/43666833/126552614-343e5481-aa75-4b7a-9c0f-bcb837370dcf.png)

## Installation

### Using NPM

```bash
npm install gh-recent-activity
```

### Usage

```javascript
import { getUserActivity } from "gh-recent-activity";

const activity = await getUserActivity("akulsr0");
/*
[ 
  {
    text: 'Created main branch on akulsr0/gh-activity',
    user: {
      name: 'akulsr0',
      link: 'https://github.com/akulsr0',
      img: 'https://avatars.githubusercontent.com/u/43666833?'
    },
    repo: {
      name: 'akulsr0/gh-activity',
      link: 'https://github.com/akulsr0/gh-activity'
    },
    created: { type: 'branch', branch: 'main' },
    type: 'create'
  },
  ...
]
*/
```

#### Using Promise

```javascript
import { getUserActivity } from "gh-recent-activity";

getUserActivity("akulsr0").then((activity) => {
  // Do what you want here...
  console.log(activity);
});
```

#### Options

You can also pass an additional options param in _getUserActivity_ function.

| Option         | Default |  Type   |                      Description |
| :------------- | :-----: | :-----: | -------------------------------: |
| includeEmoji   |  false  | Boolean |  Includes emoji in activity text |
| includeCommits |  false  | Boolean | Includes user's commits activity |

---
_Source: https://npm.io/package/gh-recent-activity · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
