New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ibge/noticias

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibge/noticias

## Instalação

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Noticias

Instalação

Para instalar a biblioteca, rode:

$ npm install @ibge/noticias --save

Usando a biblioteca

Após instalar a biblioteca, você deve importar o NoticiasModule no seu AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

// Módulo de Notícias
import { NoticiasModule } from '@ibge/noticias';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    
    // Adicionar o NoticiasModule no AppModule, caso seja em um módulo interno basta importar como NoticiasModule
    NoticiasModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Uma vez importado, é possível consumir os serviços do calendário, recebendo a informação segundo a api de calendário http://servicodados.ibge.gov.br/api/docs/noticias

// Importar o serviço e interfaces, se necessário
import { NoticiasService, Noticia, NoticiasPaginadas } from '@ibge/noticias';

// ...

  constructor(
    // Injetar o serviço no construtor do componente
    private _noticiasServ: NoticiasService
  ) {}

  ngOnInit(): void {
    // Chamar os métodos disponíveis
    this._noticiasServ.get({
      qtd: 10
    }).subscribe((noticiasPaginadas: NoticiasPaginadas) => {
      // Utilizar as noticiasPaginadas aqui
    })
  }

Desenvolvimento

Esse componente utilizou o generator do yeoman https://github.com/jvandemo/generator-angular2-library, os comandos utilizados podem ser encontrados na documentação

Licença

MIT

Keywords

FAQs

Package last updated on 09 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc